Hacker News new | ask | show | jobs
by edwintorok 1411 days ago
Zenbones allows to define custom color schemes by providing just a few base colours and overrides. You could try creating one based on penumbra to have both lightness contrast and distinct hue.

However note that it is quite difficult to get Zenbones work with existing colorschemes, I tried creating/tweaking one based on Zenburn, but in the end I had to go back to the original Zenburn because Zenbones just wasn't distinguishing enough for the various treesitter highlighting groups.

But perhaps some of the zenbones concepts could be combined with Penumbra in penumbra itself to have another variant in addition to the contrast++ one.

And as mentioned elsewhere there are scientific ways to produce colormaps that work for people with color vision deficiency too, so it'd be nice if that was addressed.

1 comments

Just on the last point, I’d be interested to know what scientific ways to construct CVD-friendly colour maps you mean.

I’m aware of all the continuous colour maps for visualisations and these are pretty much “solved”, but for discrete, categorical ones, the optimisation is trickier and I’m only aware of “good enough” versions rather than fully optimized ones.

Colorbrewer2.org has a colourblind safe version. https://peterkovesi.com/papers/ColourMapsForColourBlindIAMG2... talk about designing colormaps in the colorspace of a particular colorblindness (instead of checking whether it is safe after the fact which is non-optimal). My very basic understanding of that is that it'd replace sRGB with a colorspace that represents a particular colorblindess and then uses the same algorithm it'd use on sRGB to obtain a nice scheme in the colourblind space (or at least as much as it is possible given the constraints/reduced gamut).

I am not colourblind though, so I can't vouch for how good these are in practice, but at least there is some systematic thought that went into the process instead of ad-hoc rules.

Colorbrewer is safe for CVD but not optimized to be as distinguishable as possible no matter your impairment as far as I’m aware. That’s what I’m trying to do in a different project.

Colormaps have very different constraints due to having to cover a continuous ramp and are therefore also not optimal for categorical palettes. I personally like these the best overall: https://www.fabiocrameri.ch/colourmaps/ but there are many good options at this point.