256 color HSV palette

open-source

#1

EDIT: Here is the new and improved palette:


the older palette

I am sharing my public domain general purpose 256 color palette I have created for the use in my demos (e.g. this). (Actually I have modified it slightly, to not have duplicite colors.) Its main advantage is that it can relatively quickly change brightness (value) of colors, which you can use to do lighting/shading effects (the function is below) or fading into dark/light:

out

I have moved everything, including the details and explanations, into this repo:


#2

That is very clever. Thanks for sharing.


#3

I am now reworking the post, everything will be moved to a GitLab repository and I will create a header file with the palette and helper functions, that will be much easier to use.


#4

After documenting this though I think I should improve the palette, it has a lot of imperfections – some colors are too similar to other colors and the red color doesn’t have a low saturated version (there is grayscale in its place), so there is this gap in the sampling of the HSV space – I’d like to make it more uniform, and maybe go for 3 bits for value instead of 4 and leave more space for saturation.