

Picking Colors Optimally: An Optimization Problem in Python - beala
http://www.usrsb.in/picking-colors.html

======
lutusp
The article's method contrasts colors based on the numerical separation of
their RGB values. Unfortunately, human color perception doesn't necessarily
follow this model. There are some color pairs that would be judged very far
apart by this method, but that a human won't necessarily perceive as
contrasting.

Also, there's the issue of size. Medium-sized adjacent objects are perceived
as having more contrast than large or small ones:

[http://en.wikipedia.org/wiki/Contrast_(vision)#Contrast_sens...](http://en.wikipedia.org/wiki/Contrast_\(vision\)#Contrast_sensitivity)

So this is a more complex problem than simply choosing colors by number.

~~~
beala
You're absolutely right! :) It would be interesting if someone could extend
this to look at how different color representations affect the results, such
as using HSL rather than RGB. I tried to factor out the getSuccessors function
and evalSuccessor as much as possible to make this kind of experimentation
easy.

~~~
1331
There are many programs that algorithmically generate palettes based on the
HSV color space. Note that since complementary colors are calculated by hue
alone (a single dimension), there is no need for optimization.

Here is a web-app that I use often:

<http://colorschemedesigner.com/>

