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

get-color-spec Function

Summary

Returns the color-spec for a color.

Package

color

Signature

get-color-spec color => color-spec

Arguments
color
A defined color specification, color alias, or an original color name.
Values
color-spec
A color specification.
Description

The function get-color-spec returns the color-spec for color, which can be a color-spec, a color-alias, or an original color name.

Examples
CL-USER 28 > (color:define-color-alias :lispworks-blue 
               (color:make-rgb 0.70s0 0.90s0 0.99s0))
(#S(COLOR-ALIAS COLOR #(:RGB 0.699999S0 0.9S0 0.99S0)))
 
CL-USER 29 > (color:define-color-alias 
               :color-background :lispworks-blue)
(#S(COLOR-ALIAS COLOR :LISPWORKS-BLUE))
 
CL-USER 30 > (color:define-color-alias 
               :listener-background :color-background)
(#S(COLOR-ALIAS COLOR :COLOR-BACKGROUND))
 
CL-USER 31 > (color:get-color-spec :listener-background)
#(:RGB 0.699999S0 0.9S0 0.99S0)
 
CL-USER 32 > (color:get-color-spec :color-background)
#(:RGB 0.699999S0 0.9S0 0.99S0)
 
CL-USER 33 > (color:get-color-spec :lispworks-blue)
#(:RGB 0.699999S0 0.9S0 0.99S0)
 
CL-USER 34 > (color:get-color-spec 
             #(:RGB 0.70s0 0.90s0 0.99s0))
#(:RGB 0.699999S0 0.9S0 0.99S0)
 
CL-USER 35 > 
See also

define-color-alias
get-color-alias-translation
15 The Color System


CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:50