wiki:ColorGradient
close Warning:

UltraScan III Color Gradients and Color Maps

Color Gradients

Color gradients are used in UltraScan III applications like us_pseudo3d_combine and us_ga_init to represent data in a pseudo-3-dimensional way. The third dimension in a plot is illustrated by a color mapping.

For example, in the following US_GA_Initialize plot, low frequency values show as white and cyan, middle values as magenta, and high values as red or black.

Color Maps

A gradient of colors is specified via a color map. The color map consists of a start color, followed by a series of color steps. Each color step consists of an end color and a number of points. The derived gradient begins with the start color, transitions to the first step end color for the step number of points, transitions to the second end color over the second number of points, and so on.

Color maps are persisted in color map XML files that specify the color steps. Such color map files can be produced with the us_colorgradient application. The sample below shows the "cm-w-cyan-magenta-red-black" map that is the default used by us_pseudo3d_combine and us_ga_init. It results in a gradient of 51 colors from white to black. The transitional steps are as follows:

  • A start color of white.
  • 5 colors from white to cyan.
  • 20 colors from cyan to magenta.
  • 15 colors from magenta to red.
  • 10 colors from red to black.

Note that in producing new color map files with us_colorgradient, you should adhere to the naming convention ("cm-"(-colors-)".xml"). Specifically, the convention is:

  • The name starts with "cm-" for color map, so in loading color map files, a filter of "cm-*.xml" can be used.
  • It is followed next by a single-character representation of the start color: "w" for white, "b" for black, "g" for gray, "y" for yellow, and so on.
  • The bulk of the name consists of step end color names separated by dashes ("-cyan-magenta-red-black").
  • The file extension is ".xml".
Last modified 8 years ago Last modified on Mar 25, 2010 9:53:36 PM

Attachments (2)

Download all attachments as: .zip