I have a set of 256 colors (all available colors in an xterm-256color terminal) and I am using a script called 256colors2.pl that I see mentioned in nearly every Internet article that talks about 256 color terminals. This is script's output is a 6x6x6 color cube laid out as a series of 6 6x6 slices of the cube, plus a line with grays from black to white.
What I am looking for is some 2D shape, and the corresponding algorithm to lay out 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 grays).