Live data from Hacker News

Show HN: A Color Palette Generator I Built For My Senior Thesis

colormoo.com

41–45 of 45 posts

Re: Show HN: A Color Palette Generator I Built For My Senior Thesis

#41
post #4

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 blo…

> 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]

Re: Show HN: A Color Palette Generator I Built For My Senior Thesis

#42

Does the algorithm use HSL as its color space? I've seen many online palette tools that use HSL color wheels for picking colors. It never made sense to me why they wouldn't use a perceptually uniform color space like CIELUV. I actually made a color space derived from CIELUV specifically for the task of picking colors [1]. I never wrote a 'proper' palette generator using it, but I did make a demo that works pretty wel…

Thank you for creating HUSL! I discovered it as I was midway through my project. I am very glad that this exists! I agree, CIELUV or CIELAB would probably be a better fit. As I mention in my comment above, it wasn't immediately clear to me how I would generate a palette using the space given the holes, especially since I allow the user to choose any color they want. I am curious, how would you approach generating a p…

Thanks :)

> how would you approach generating a palette using these color spaces?

This is exactly the problem I was trying to solve in creating HUSL.

You can think of HUSL as a version of CIELUV (Or, more specifically CIELCHuv, the cylindrical transformation of CIELUV) that is stretched vertically to fill in the 'holes'. HUSLp, the pastel version, is similar, but instead of stretching, it cuts the saturated colors off. (You can switch between them in the demo).

In fact, those stretching and cutting functions are the only thing that HUSL really does, the rest is all CIE math :P

Re: Show HN: A Color Palette Generator I Built For My Senior Thesis

#43

Does the algorithm use HSL as its color space? I've seen many online palette tools that use HSL color wheels for picking colors. It never made sense to me why they wouldn't use a perceptually uniform color space like CIELUV. I actually made a color space derived from CIELUV specifically for the task of picking colors [1]. I never wrote a 'proper' palette generator using it, but I did make a demo that works pretty wel…

I like it but isn't blue under represented?

It could be. The only new component that HUSL defines is saturation (it's a distorted version of CIELCHuv's chroma). Both hue and lightness are exactly like CIE defined them after doing actual empirical research on color vision.

So while the hue component isn't perfectly perceptually uniform, there is no way I could improve it without doing an actual study.

Re: Show HN: A Color Palette Generator I Built For My Senior Thesis

#45

Does the algorithm use HSL as its color space? I've seen many online palette tools that use HSL color wheels for picking colors. It never made sense to me why they wouldn't use a perceptually uniform color space like CIELUV. I actually made a color space derived from CIELUV specifically for the task of picking colors [1]. I never wrote a 'proper' palette generator using it, but I did make a demo that works pretty wel…

I just checked out HUSL, that's amazing. The syntax demo is really cool. The colour schemes it generates are much more visible and pleasant to the eye (my eye, at least) than Solarized.

Disclaimer: I'm slightly colour-blind - take with a pinch of salt :-)

Post reply on HN