Next: Colormap Functions, Previous: Colormaps and Colors, Up: Colors [Contents][Index]
A color is represented by a CLX color object, in which each of the red, green, and blue values is specified by an rgb-val – a floating point number between 0.0 and 1.0. (see Data Types). The value 0.0 represents the minimum intensity, while 1.0 represents the maximum intensity. CLX automatically converts rgb-val values into 16-bit integers when sending colors to an X server. The X server, in turn, scales 16-bit color values to match the actual intensity range supported by the screen.
Colors used on :gray-scale screens must have the same value for each of red, green, and blue. Only one of these values is used by screen hardware to determine intensity; however, CLX does not define which of red, green, or blue is actually used.
The following paragraphs describe the CLX functions used to create, access, and modify colors.
rgb-val values that specify the saturation for each primary.
Creates, initializes, and returns a new color object with the specified values for red, green, and blue.
Type color.
A color object.
Returns and (with setf
) sets the value for blue in the
color.
Type rgb-val.
A color object.
Returns and (with setf
) sets the value for green in the
color.
Type rgb-val.
Returns non-nil if the argument is a color object and nil otherwise.
Type boolean.
A color object.
Returns and (with setf
) sets the value for red in the
color.
Type rgb-val.
A color object.
Returns the values for red, green, and blue in the color.
Type rgb-val.
Next: Colormap Functions, Previous: Colormaps and Colors, Up: Colors [Contents][Index]