256 color HSV palette

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:

8 Likes

That is very clever. Thanks for sharing.

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 Likes

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.

3 Likes