Lokesh Dhakar's Color Thief is a clever JavaScript library that uses the Canvas API to create RGB palettes from source images. You can use it to find the dominant color of an image, or extract any number of colors into a palette. Cool!
I used Color Thief over the weekend to create a new header graphic for my webcomic Neat Hobby. I extract up to eight colors from the first comic image on the page, then randomly choose one as the background color for the header graphic. Go reload some pages to see the colors change out.