Hacker News new | ask | show | jobs
by sndwnm 2114 days ago
All the articles I've seen about the topic talk about how to select a palette of 2-4 colors. How would one go about picking something like 8 hues, with different levels of emphasis for some of them?

I'm trying to do something akin to designing a terminal color scheme. I've seen some websites that let you put in values and see how the color scheme would look like, but I'm more interested in insight to how to make it look aesthetic. Colorblind friendliness is not a high priority.

3 comments

I recently tried to answer the same question for myself when I wanted to figure out what color palette to use in my game. Basically the idea is that you can divide the 360 degree hue into even sections and get colors from that. Put different luminosities in the mix and set same saturation of everything, and you've got yourself a beautiful palette with tons of coherent colors.

I haven't found a tool that would help generating such palettes, so I built one for myself, feel free to use it:

https://kodolinija.com/tools/hsl-color-palette-generator/

Excellent! Thank you.
How would one go about picking something like 8 hues, with different levels of emphasis for some of them?

I’m not sure what you are looking for in terms of emphasis, but if you want to work with lots of hues, I recommend looking into “perceptually uniform colour spaces”.

It’s not unusual to see a colour wheel with “pure” red, green and blue (in the RGB-on-your-screen sense) at angles of 0°, 120° and 240°. Then you “interpolate” and get yellow, cyan and magenta at 60°, 180° and 300°. More colours get filled in to complete the wheel.

Now, there are all kinds of things wrong with this. However, possibly the biggest problem is that you can’t just pick evenly spaced colours around a wheel set up like this, say ten hues that are 36° apart, and get a good set of perceptually distinct colours as perceived by a human looking at them. Go ahead and try it; you’ll find that some of the colours you get around the green part of the wheel appear much more similar than most of the others.

This sort of problem was recognised long ago by Munsell, who attempted through experimental research to find a way to represent colours where the steps appeared even to a human viewer. This resulted in the Munsell colour system, which is essentially a huge but quite useful look-up table that will give you perceptually even colours just by varying say the hue or value by the same number of steps. Later efforts by the CIE would try to codify those ideas in more mathematically tractable ways, and the CIE colour spaces in expert use today still have much the same ideas underlying them.

If you took a Munsell colour wheel and picked hues in 10 even steps around the wheel (for the same value and chroma), and then converted the resulting colours back to the bad but popular colour wheel described above, what you’d find is that the converted hues would have bigger changes in some areas, particularly around the greens, and smaller changes in others, which would compensate for the problem described above and give a more visually even palette.

This rabbit hole goes pretty deep, because this is already quite a long comment and I’ve only talked about hue so far. It turns out that getting perceptual uniformity on the other axes is not always trivial either, not least because the available value and chroma options differ from one hue to another: we can’t perceive any blue that looks anywhere near as strong as the strongest yellows we can see, for example. Depending on what your palette is for, this can be very important, because as others have noted, it’s a good idea to vary more than just hues if you’re trying to construct a palette of clearly distinct colours for things like drawing charts or other data viz work.

Thanks for the detailed answer. I'll look into terms you pointed out.

I had indeed noted experimentally that picking hues using regular spacing from the common color wheels doesn't work so well, at least not without varying the other components of color. I think for my purposes it will be enough to start with a Munsell-like group of distinct hues and tinker manually from there.