Next: DrawClear and Flip
Up: Graphics
Previous: Position Operations
A color can be represented in two ways: as a color index or as a
rgb value. All drawing functions which take a color argument
accept colors in both forms. An rgb value is assigned to
and index with change-color.
-
(make-rgb red green blue)
make-rgb takes three values in the range 0 (dark) to 1 (bright) and
returns an rgb (a color). -
(rgb-red color)
(rgb-blue color)
(rgb-green color)
rgb-red, rgb-green and rgb-blue return the red, green,
and blue components, respectively, of a color. -
(rgb? color)
rgb? reports whether color is a valid color. -
(change-color index rgb)
change-color changes the color at index in the color table to the
color specified in rgb. -
(default-display-is-color?)
default-display-is-color? returns #t if the default display
screen for viewports is in color or #f otherwise.
PLT