Next: , Previous: , Up: Colormap Functions   [Contents][Index]


10.3.5 Changing Colors

The following paragraphs describe the CLX functions to change the colors in colormap cells.

Function: store-color colormap pixel color &key (:red-p t) (:green-p t) (:blue-p t)
colormap

A colormap.

pixel

A pixel.

color

A color object or a stringable containing a color name.

:red-p
:green-p
:blue-p

boolean values indicating which color components to store.

Changes the contents of the colormap cell indexed by the pixel. Components of the given color are stored in the cell. The :red-p, :green-p, and :blue-p arguments indicate which components of the given color are stored.

The color can be either a color object or a stringable containing a color name. If a color name is given, a corresponding color value is looked up (see lookup-color) and used. Color name strings must contain only ISO Latin-1 characters; case is not significant.

Function: store-colors colormap pixel-colors &key (:red-p t) (:green-p t) (:blue-p t)
colormap

A colormap.

pixel-colors

A list of the form ({pixel color}*).

:red-p
:green-p
:blue-p

boolean values indicating which color components to store.

Changes the contents of multiple colormap cells. pixel-colors is a list of the form ({ pixel color}*), indicating a set of pixel values and the colors to store in the corresponding cells. The :red-p, :green-p, and :blue-p arguments indicate which components of the given colors are stored.

Each color can be either a color object or a stringable containing a color name. If a color name is given, a corresponding color value is looked up (see lookup-color) and used. Color name strings must contain only ISO Latin-1 characters; case is not significant.


Next: , Previous: , Up: Colormap Functions   [Contents][Index]