Next: I.6 Thinking in RGB Up: I. Color Space: The Previous: I.4 Color interpolation Contents Index

#
I.5 Artificial illumination

GMT uses the HSV system to achieve artificial illumination of colored images (e.g. -I option in grdimage) by changing the saturation s and value v coordinates of the color. When the intensity is zero (flat illumination), the data are colored according to the cpt file. If the intensity is non-zero, the color is either lightened or darkened depending on the illumination. The color is first converted to HSV (if necessary) and then darkened by moving (,) toward (HSV_MIN_SATURATION, HSV_MIN_VALUE) if the intensity is negative, or lightened by sliding (,) toward (HSV_MAX_SATURATION, HSV_MAX_VALUE) if the illumination is positive. The extremes of the and are defined in the .gmtdefaults4 file and are usually chosen so the corresponding points are nearly black ( = 1, = 0) and white ( = 0, = 1). The reason this works is that the HSV system allows movements in color space which correspond more closely to what we mean by ``tint'' and ``shade''; an instruction like ``add white'' is easy in HSV and not so obvious in RGB.

Next: I.6 Thinking in RGB Up: I. Color Space: The Previous: I.4 Color interpolation Contents Index