Page 1 of 1

Color Palette - main colors

Posted: 2014-04-27T11:25:13-07:00
by dognose
Hi All

I'm trying to extract matching colors from an image.

For example : http://www.degraeve.com/color-palette/

I've tried a few ways with IM, and I can get something close with

" -colors 5 -unique-colors "

then outputing the color data.

But, I'm not happy with the colors listed. They seem more dull and mismactched than the ones with degraeve's site.
Any ideas on how to extract a nice color palette?

Re: Color Palette - main colors

Posted: 2014-04-27T11:33:07-07:00
by Bonzo
This has been discussed a couple of times before and its just a matter of finding the threads!
Latest one: viewtopic.php?f=1&t=25086&hilit=color+palete

I can not find the interesting one from a few years ago.

Re: Color Palette - main colors

Posted: 2014-04-27T12:09:44-07:00
by fmw42
It would appear that they process the input image to adjust the brightness and contrast or gamma or sigmoidal-contrast so as to make a dull version and vibrant version. However without adding such processing, try reducing the depth first.

compare these (unix syntax)

Image

Code: Select all

list=`convert beach.jpg +dither -colors 5 -unique-colors txt:- | tail -n +2 | sed -n 's/^.*\#.* \(.*\).*$/xc\:\1/p'`
convert -size 50x50 $list -append palette.png
Image

Code: Select all

list=`convert beach.jpg -depth 3 +dither -colors 5 -unique-colors txt:- | tail -n +2 | sed -n 's/^.*\#.* \(.*\).*$/xc\:\1/p'`
convert -size 50x50 $list -append palette2.png
Image


Image