colors

this section describes cmaps, and explains how i derive them automatically from scanned images.

before i go any further, i must rant: i'm sick of seeing otherwise very nice computer generated pictures, and fractals in particular, ruined by something so easy to fix: a rainbow colormap. at least people have stopped using FULLY SATURATED RAINBOWS!!! and you cynics don't believe in progress...

a colormap is a palette plus an ordering. usually a cmap is just a table mapping 8 bit indices to 24-bit colors. since the cmap is often used to visualize a continuous scalar parameter (eg heat), ideally the mapping from number to color is continuous. that is, colors for adjacent numbers are near each other.

i generate cmaps automatically from scanned images. i've been using the same cmaps for several years. most are derived from nature backgrounds (and a few foregrounds) to pictures found on alt.sex.binaries.erotica. some are derived from scanned impressionist paintings. the derivation has two stages: first it picks the colors, then it sorts the colors to make the cmap continuous.

the palette of 256 colors comes from picking 256 random small rectangles (say 4x4 pixels) in the source image, and taking the average of each of them. a randomized hill-climber improves the ordering. see here.