You can enter a color alias in the color database using the function define-color-alias
. You can remove an entry in the color database using delete-color-translation
.
define-color-alias name alias-for &optional
(if-exists (first '(:replace :error :ignore)))
This makes an entry in the color database under name , which should be a symbol. LispWorks by convention uses keyword symbols. alias-for is either a color-spec or another color name (symbol). Attempting to make an alias for an original entry in the color database results in an error. An original entry means one present in a new LispWorks image or one entered via the color database loading functions described below. If the entry is already present and is a color alias, then the value of the if-exists argument is used to determine how to continue.
(color:define-color-alias :wire-color :darkslategray)
delete-color-translation color-name
This removes an entry from the color-database. Both original entries and aliases can be removed.
As described in Color specs, the function get-color-spec
returns the color-spec associated with a color alias. The function get-color-alias-translation
returns the ultimate color name for an alias.
get-color-alias-translation color-alias
This returns the ultimate color name associated with color-alias .
(define-color-alias :lispworks-blue
(make-rgb 0.70s0 0.90s0 0.99s0))
(define-color-alias :color-background
:lispworks-blue)
(define-color-alias :listener-background
:color-background)
(get-color-alias-translation :listener-background)
=> :lispworks-blue
(get-color-alias-translation :color-background)
=> :lispworks-blue