Colors/
color24.pro
The purpose of this function is to convert a RGB color triple
into the equivalent 24-big long integer.
This routine was written to be used with routines like
or getcolor.
color24
Graphics, Color
result = color24(rgb_triple)
Return value
{type=long integer}
a 24-bit long integer that is equivalent the input color.
The color is described in terms of a hexadecimal number (e.g., FF206A)
where the left two digits represent the blue color, the
middle two digits represent the green color, and the right
two digits represent the red color.
Parameters
rgb_triple
in
required
type: byte, A three-element array
A color triple. The values of the elements must be between 0 and 255.
Examples
To convert the color triple for the color YELLOW,
(255, 255, 0), to the hexadecimal value '00FFFF'x
or the decimal number 65535, type:
IDL> color = COLOR24([255, 255, 0])
Version history
Version
$Id: color24.pro 371 2008-08-07 09:32:02Z pinsard $
History
Written by: David Fanning, 3 February 96.
Produced by IDLdoc 2.0.