Author Topic: It's The Little Things  (Read 1205 times)

Jonnydark

  • Jr. Member
  • **
  • Posts: 31
I just wanted to say I love the way when you click on an album the background samples a colour from the album art AND the highlight track text picks a complimentary colour from the same artwork.

I have no idea how that's done! I would love to know though... not in "Trade Secret" revealing detail, but just, in simple terms, what is happening?

Thanks!

johmi

  • Newbie
  • *
  • Posts: 4
Of course I dont know how it is implemented in MB but here is how I would do it:

1. Get the Album Image
2. Use an algorithm to determine the most used colors in the Image (try this: http://www.coolphptools.com/color_extract)
3. Use x colors to generate the background for the album
4. Use y color for highlighting
5. If that makes the background rather dark, use white album-header, if it makes background rather bright, use black album-header
6. Do some fine tuning
7. Enjoy the view :)

Jonnydark

  • Jr. Member
  • **
  • Posts: 31
Thanks! This was a great explanation! I love that website!