Help - Search - Members - Calendar
Full Version: Album art colour sampler?
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
Beavis04
I was just wondering if it's possible to code a component that averages the colour for album art so you could use it somwhere in the display of Foobar's playlist....ie say the Beatles White album would produce the colour white, with this information the white is then on the background of the album name in the playlist....

It's hard to describe but it pretty much works like the header system over at Rateyourmusic.com

Here's some examples, the album colour is reflected on the text of the header, this is an automated process:

http://rateyourmusic.com/release/album/kyu..._to_sky_valley/
http://rateyourmusic.com/release/album/the...arts_club_band/
http://rateyourmusic.com/release/album/bla...ter_of_reality/
http://rateyourmusic.com/release/album/rad...ad/ok_computer/

I hope someone understands...
strogoff_ger
Yes, i think this is a brilliant idea. Unfortunately i have no clue how to do it.
gfngfgf
I probably could add something like this to foo_uie_albumart. I'd have to figure out what to do if you have more than one Album Art Panel showing, but that shouldn't be too hard.
rama kandra
I have some things to add, and comment on this idea. 1. its pretty neat and would do a lot of things for the appearance of your player for certain albums. However, this requires album art which we will assume you and I have. After that, you want to 'average' the color? I don't know how that would work without an external application, but needless to say, it COULD be done. Then you would most likely have to create a new metafield for each album and have the color put in... which then requires another script to change the appearance of other stuff(s).

I saw those URL's and was hoping you were right about the colors, but they are not. The 'average' color of sgt. peppers is not teal, and radiohead is mostly white. If you were to average these albums colors, you would get... mucky colors for sgt pepper and a lighter blue for ok computer... my feeling is that each of these albums were just thrown in photoshop and a color was picked at random that represented a significant swatch of color from the cover art, and used as the header using a database of albums and color...

sorry if this is a bit disappointing, but I dont see how this could be genuinely achived the way it is suggested at top. However, I do think that if someone could create or help with a process of bringing a meta field such as "ALBUM COLOR" into the playlist per album, that could be a good first step.

and from there, you could pick colors from your favorite albums and use that value (it is manual, I know, and a pain) but it will work pretty well IMO
mundschuss
with teh currently aviable plugins it isnt possible!

i know no üprogramm which could give you the average colour of an photo.

but most of the foobar would be brown, because when you're mixing all colours, you get brown =) (in sub-additiv-coulour-sheme, in additiv-colour sheme it would be white).

i think not the average coulour of an cover art wourld be intresting for an the foobar skin, but maybe the main colours of a cover, but this had to be spicified by the user and couldnt be done automatic.

example this one:
http://www.ori0n.it/files/copertine/cover-...-octavarium.jpg

The Main-Colours of this cover art is the green of the gras, the blue of the sky, the black for the font and silver.

if you wirte something like this in the tag (e.g. RGB_1=255 125 18, RGB_2=xxx xxx xxx and so on) and write a script in panel_ui, i think, this would work, but it would been to much work, cuase you have to open every coverart with an gaphik editor and watch out the RGB and write it into the tags.


seeya

dennis
barfoo
QUOTE(mundschuss @ May 26 2007, 12:45) *

with teh currently aviable plugins it isnt possible!

i know no üprogramm which could give you the average colour of an photo.


There are various ways to do this with external programs; one example is the ImageMagick program, with instructions on how to do it (and some alternative and possible more useful things to calculate rather than "average color") here: http://www.imagemagick.org/Usage/compare/.
Beavis04
QUOTE(rama kandra @ May 27 2007, 05:26) *
my feeling is that each of these albums were just thrown in photoshop and a color was picked at random that represented a significant swatch of color from the cover art, and used as the header using a database of albums and color...

sorry if this is a bit disappointing, but I dont see how this could be genuinely achived the way it is suggested at top.


This is not the case, the colours are generated instantaneously and automatically. I have moderation powers on this site and whenever I upload an album cover it instantly changes the colours of the headings and text.
rama kandra
if you have moderation power, perhaps you can get in touch with the person who designed that nifty little thing. perhaps they would be generous and share how they went about it. now I am really trying to come up with some ideas since you shattered my world with that update. how the hell does a web app pick the colors like that? anyone?? ANYONE??
Beavis04
Good suggestion rama.

I've just asked the Administrator of the site about it and gave him a link to this thread. I'll let you know if he gets back to me but I can understand if he doesn't want to share this technique.

Edit: Perhaps "average colour" isn't the best way to describe it either. It seems to pick out two relating contrasting colours of the album's cover.
mundschuss
QUOTE(Beavis04 @ May 27 2007, 06:33) *

Edit: Perhaps "average colour" isn't the best way to describe it either. It seems to pick out two relating contrasting colours of the album's cover.


that should work automaticly? LOL

i think, it will no work, til computers are as inteligent as humans. sorry dude.


seeya
stormgren
QUOTE(mundschuss @ May 27 2007, 01:46) *


that should work automaticly? LOL

i think, it will no work, til computers are as inteligent as humans. sorry dude.


seeya


Um, yeah, it should. It's not that difficult to do. There are several sites that do it (http://colr.org http://www.pic2color.com/index.htm http://bighugelabs.com/flickr/colors.php to name a few.) Unfortunately I haven't found an algorithm yet. Shouldn't be that difficult though. It doesn't even seem to take server overhead.

Probably what to do would be to use ImageMagick to reduce the color palette down to, say, sixteen colors and then pick a few randomly from that list. Maybe pick best contrasting?
Beavis04
QUOTE(mundschuss @ May 27 2007, 16:46) *

QUOTE(Beavis04 @ May 27 2007, 06:33) *

Edit: Perhaps "average colour" isn't the best way to describe it either. It seems to pick out two relating contrasting colours of the album's cover.


that should work automaticly? LOL

i think, it will no work, til computers are as inteligent as humans. sorry dude.


seeya


People can send satellites into space and robots to Mars, yet we have to wait for computers to become as "inteligent" as humans so we can extract a few colours from a picture? Hahaha
bojo
Looks to me like it's picking the most occuring colour. But ignoring stuff like white and black?. Least that's what my eyes pickup on and how i'm thinking about them.

So maybe it's something like, pick most occuring pixel shade (probably posterizes the image or something first). And ignore RGB values that have elements close together. (eg 100,100,100) is a shade of black, so it would be ignored?. But say (0,200,50) is very different.
rama kandra
I think we should just hold out till' the developer of that website have given word of how the effect is achieved. But until then, perhaps we could come up with some visual effects or things we could utilize from having color samples available?

What would you like to do with the colors chosen? I think the original poster mentioned changing the playlist alternating colors. Perhaps there could be a way to change the colors of the spectrum analyzer? Is that possible?
foosion
QUOTE(mundschuss @ May 27 2007, 08:46) *
that should work automaticly? LOL

i think, it will no work, til computers are as inteligent as humans. sorry dude.

Creating an optimized palette for an image certainly requires neither magic nor human intervention, even for a low number of colors (2, 3, 4, ...). I think such a palette would give you some good candidate colors.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.