All Manuals > CAPI User Guide and Reference Manual > 24 COLOR Reference Entries

NextPrevUpTopContentsIndex

define-color-models

Macro
Summary

Defines all the color models.

Package

color

Signature

define-color-models model-descriptors => color-models

Arguments

model-descriptors

A list, each element being a model-descriptor.

Values

color-models

The color models defined.

Description

A model descriptor has the syntax:

( model-name component-descr *)

A component-descr is a list:

( component-name lowest-value highest-value )

The default color models are defined by the following form:

(define-color-models ((:rgb (red 0.0 1.0) 
                            (green 0.0 1.0) 
                            (blue 0.0 1.0))
                      (:hsv (hue 0.0 5.99999) 
                            (saturation 0.0 1.0) 
                            (value 0.0 1.0)) 
                      (:gray (level 0.0 1.0))))

If you want to keep existing color models, add your new ones to this list: only one define-color-models form is recognized. The form should be compiled.

Example

To replace the HSV color model with a CMYK model, while retaining the other color models:

(define-color-models ((:rgb (red 0.0 1.0) 
                            (green 0.0 1.0) 
                            (blue 0.0 1.0))
                      (:cmyk (cyan 0.0 1.0) 
                             (magenta 0.0 1.0) 
                             (yellow 0.0 1.0)
                             (black 0.0 1.0)
                      (:gray (level 0.0 1.0))))
See also

The Color System


CAPI User Guide and Reference Manual (Unix version) - 25 Feb 2015

NextPrevUpTopContentsIndex