NextPrevUpTopContentsIndex

5.1.1 Color Objects

A color in CLIM is an object representing the intuitive definition of color: white, black, red, pale yellow, and so forth. The visual appearance of a single point is completely described by its color.

A color can be specified by three real numbers between 0 and 1 inclusive, giving the amounts of red, green, and blue. Three 0's mean black; three 1's mean white. A color can also be specified by three numbers giving the intensity, hue, and saturation. A totally unsaturated color (a shade of gray) can be specified by a single real number between 0 and 1, giving the amount of white.

You can obtain a color object by calling one of make-rgb-color , make-ihs-color , or make-gray-color , or by using one of the predefined colors listed in 5.3, Predefined Color Names in LispWorks CLIM or . Specifying a color object as the :ink drawing option, the foreground, or the background causes CLIM to use that color in the appropriate drawing operations.

color [Protocol Class]	

Summary: The color class is the protocol class for a color. If you want to create a new class that behaves like a color, it should be a subclass of color . Subclasses of color must obey the color protocol.

All of the standard instantiable color classes provided by CLIM are immutable.

colorp [Function]	

Arguments: object

Summary: Returns t if object is a color; otherwise, it returns nil .


Common Lisp Interface Manager 2.0 User's Guide - 27 Feb 2008

NextPrevUpTopContentsIndex