Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


Harris Geospatial / Docs Center / Libraries / Bowman / COLOR_24_KPB

COLOR_24_KPB

COLOR_24_KPB

Name


COLOR_24_KPB

Purpose


Convert r, g, and b color value(s) to 24-bit color values. R, g, and b
should be integers in the range [0, 255]. If not, they are converted to LONGs
and then truncated to that range. R, g, and b can be three scalars or three
    arrays of equal dimension.
If g and b are omitted and r is a numerical expression, then r is assumed to
represent a grayscale value. That is, the g and b values are set equal to r.
This function also includes a set of predefined colors that can COLOR_24_KPB selected
by name. If g and b are omitted and r is STRING expression, COLOR_24_KPB
attempts to find a color with that name in the predefined table of colors.
If the current device is not a 24-bit device (such as the PS device), COLOR_24_KPB
    assumes that LOAD_BASIC_COLORS_KPB has been called to load the predefined colors
    into the color table.

Category


Color calculations.

Calling Sequence


color = COLOR_24_KPB(r, g, b) for 24-bit color
color = COLOR_24_KPB(r) for 24-bit grayscale
color = COLOR_24_KPB('name') for pre-defined color

Input


r : red value(s). r is converted to LONG and truncated to the range [0, 255]
g : green value(s). g is converted to LONG and truncated to the range [0, 255]
b : blue value(s). b is converted to LONG and truncated to the range [0, 255]
r : string containing the name of a predefined color

Output


Scalar or array of 24-bit color value(s) of type LONG.

Modification History


    Kenneth P. Bowman, 1999-02-11.
    Kenneth P. Bowman, 2001-02-14. Modified to include predefined colors by name.
    Kenneth P. Bowman, 2003-10-09. Modified to allow single numerical value for r to indicate grayscale.
    Kenneth P. Bowman, 2005-11-09. Added more colors.
Department of Atmospheric Sciences
Texas A&M University
College Station, TX 77843-3150
http://idl.tamu.edu



© 2017 Exelis Visual Information Solutions, Inc. |  Legal
My Account    |    Buy    |    Contact Us