I have a set of 256 colors (all available colors in the terminal xterm-256color) and I use a script called 256colors2.pl, which I mentioned in almost every article on the Internet that talks about 256 color terminals. This script output is a 6x6x6 cube laid out as a series of 6 6x6 cube pieces, plus a line with gray from black to white.
I am looking for some two-dimensional shape and an appropriate algorithm for rendering these colors in 2D so that all the transitions are smooth. This should be applicable to a reduced set of colors (256 in this case, which includes a limited set of shades of gray).
source share