Some More Color Maps


Have you made any color maps? I'm looking for a rainbow color map or a blue-scale color map.


Below are a few color maps that I've made that you might find useful. Instead of providing a template or CDAT script, I'm providing the Python code that created the RGB values dictionary, so you'll have maximum flexibility in using them. All my color maps use the default color map as the original template, and modify color indices 16 to 239, and I call all my color maps "my_cmap". The first column describes the color map (the progression is from color index 16 to 239). The second column contains links to scripts that create the color maps. The numbers on the axis of the color bars refer to the color index; color index 0 is the color shown on the color bar from x-axis value 0 to 1, color index 1 is the color shown from x-axis value 1 to 2, etc.

DescriptionCodeColor Bar
Black-White (dark to light)
Blue (dark to light)
Blue (light to dark)
Blue-Red (dark to light blue, then light to dark red; blue is color indices 16-127, red is 128-239)
Rainbow (violet to red, 380-790 nm)
Rainbow (red to violet, 790-380 nm)
Rainbow (violet to red, 390-680 nm)
Rainbow (red to violet, 680-390 nm)

Remember that all color maps are the same for color indices 240 to 255 and in general we only use color indices 16 to 239 in graphics like a filled contour plot.

Notes: This discussion applies to CDAT 3.3.

Return to the Tips and Examples index page.

Updated: December 16, 2003 by Johnny Lin <email address>. License.