User:Waldyrious/palette

Reduced palettes from Munsell color system, value (brightness) 8.
 * Goal: obtaining a set of same-brightness, equally-spaced hues to use as colors for a syntax highlighting engine.

Background and process
I've been thinking a little about choosing a good color set for Remember the dot's syntax highlighter. I wanted to derive a good combination, rather than hand-pick a set that I think looks good.

Here's how I reached my proposal. My idea was to use colors that are equally spaced in hue (perceived hue, not pure hue as in HSL) and that have the same perceived brightness (so they'll stand out from the white background by the same amount).

For this, I used the Munsell color system, and (with the help of the Virtual Atlas), picked the plane of brightness 8 (the maximum is 9, but that's too dim). But that plane has lots of colors, very close to each other. I wanted to have only a few colors, and roughly equally spaced.

So, using Photoshop, I exported the image into png-8 with several palette choices, relying on its algorithms (perceptive, adaptive, restrictive and selective) to group similar colors together in the most economical way (I set the maximum at 16 colors, since the syntax highlighter currently supports 14 different colors, and one of the 2 extra ones was going to be the white background anyway).

I also exported each of these adding the web-snap restriction (which is what the "restrictive" option seems to do anyway), allowing it to auto-select the number of colors (it picked 18).

I extracted the resulting palettes with pngcheck and generated this page with them, so I could test how they looked.

It turns out the non-web-restricted colors don't produce very pleasant palettes this way; I'm guessing that's because they're less saturated. Even better then, as I would prefer using web-safe colors anyway (not for their purported safety, but because they're neater to specify:  is a shorthand for  ).

However, in both cases, the uniform lightness is somewhat lost, so I used a standard formula to calculate the perceived luminosity from the RGB values; the list can be filtered to allow only colors with similar luminosity, which was the goal of using the Munsell color system in the first place.

No color restriction
File: munsell_lightness8-16colors-adaptive.png

File: munsell_lightness8-16colors-perceptual.png

File: munsell_lightness8-16colors-selective.png

Only web colors

 * Note: The  entries are only placeholders, to allow alignment and comparison between the generated palettes.

File: munsell_lightness8-16colors-restrictive.png

File: munsell_lightness8-18colors(auto)-restrictive.png

File: munsell_lightness8-18colors(auto)-adaptive/perceptual/selective+websnap.png

All web colors combined