Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Picking colors is an interesting problem at the boundary of what can be done algorithmically with satisfactory results.

For my latest side project, I needed sets of up to 5 colors that go well together but are sufficiently distant not too be confused. Since this is the task that palette generators typically set out to achieve, I tried a couple of them [1,2], as well as some "hand crafted" palettes found on design blogs [2,3]. In each case, I found that the palettes, while satisfying the desired properties, were aesthetically not particularly pleasing, in a sense lacking a unifying quality.

Thinking that "picking colors that go well together" must be a solved problem, I resorted to looking up photographs of 20th century paintings (e.g. [5]) and using the color picker in Gimp to extract what I visually perceived as the most important colors. This gave me far better palettes that any of the generators.

There are ways to do this algorithmically, as a form of constrained color quantization, and I later found online implementations as well [6] that give results very close to my hand picking.

[1] http://colorschemedesigner.com/

[2] https://www.colorschemer.com/online.html

[3] http://flatuicolors.com/

[4] http://niklausgerber.com/blog/flat-ui-color-autumn-edition/

[5] http://i1.ytimg.com/vi/XcwZF1aF4LM/maxresdefault.jpg

[6] http://labs.tineye.com/color/



> at the boundary of what can be done algorithmically with satisfactory results

Mostly due to insufficient models of human perception of color. Our perception of color is not accurate, so picking complementary colors based on their actual wavelength will be less pleasing than picking complementary colors based on a perceptual model. I don't think any of the pickers you link to attempt this.

One attempt with libraries in a few common languages is HUSL: http://www.boronine.com/husl/syntax/#997061

A much older approach is described here: http://en.wikipedia.org/wiki/CIELUV

Learn more about color perception here: http://en.wikipedia.org/wiki/Color_perception

[Edit: just noticed this was referenced by this comment below: https://news.ycombinator.com/item?id=7562905]


Take a look at Munsell for Designers[0] - it purports to solve the UI palette problem.

[0]http://projects.kumpf.cc/projects/MunsellForDesigners/index....


I quite like colourlovers for palette ideas and construction - they have a tool that extracts palettes from images http://www.colourlovers.com/photocopa that might have helped you.

Not connected to the site except as a user.


Here's a shameless plug for http://www.colr.org . No palette generation algorithms, but lots of tagging and classification.


I wonder if you could train a machine learning algorithm on 20th-century paintings? ;)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: