The last time I looked at sorting colors I had produced a nice band or sorted colors, but to do so I had essentially removed a third of the data from the color information. This meant that there was no white or black colors in the band of sorted colors.
After a bit of thinking on how to solve this I hit upon a way of using a two dimensional array of colors to filter the colors into blocks. This would allow the missing color information to be rendered correctly, and would only mean a small amount of work to allow it to work with the rendering function used in the previous examples.
Generating The Data
I could easily just generate every color available and use that as the data. What I wanted to generate was a random assortment of colors that would represent the sort of data being produced by a system or other input.