Next Prev Up Top Contents Index

define-color-alias

Function
Summary

Lets you define an alias for a color specification or alias.

Package

color

Signature
define-color-alias name
 color
 &optional if-exists
 => alias
Arguments

name

The name of the new alias.

color

A color specification for the new alias.

if-exists

This can be one of the following:

:replace -- Replace any existing alias.

:error -- Raise an error if alias is already defined.

:ignore -- Ignore redefinition of an alias.

By default, it is :replace .

Values

alias

The color alias.

Description

Define name to be a color alias for color , which may be another color alias or a color-spec.

Example 1
COLOR 16 > (define-color-alias :mygray :darkslategray)
(#S(COLOR-ALIAS COLOR :DARKSLATEGRAY))
COLOR 17 > (define-color-alias :mygray :darkslategray
                               :error)
Error: :MYGRAY names an existing alias for #(:RGB 0.1843133S0 0.309803S0 0.309803S0)
  1 (continue) Replace :MYGRAY with the alias :DARKSLATEGRAY
  2 Continue, without redefining alias :MYGRAY
  3 Try a new name for the alias, instead of :MYGRAY
  4 (abort) Return to level 0.
  5 Return to top loop level 0.
  6 Destroy process.
Type :c followed by a number to proceed or type :? for other options COLOR 18 : 1 >
Example 2
COLOR 19 > (define-color-alias :lispworks-blue
                (make-rgb 0.70s0 0.90s0 0.99s0))
(#S(COLOR-ALIAS COLOR #(:RGB 0.699999S0 0.9S0 0.99S0)))
COLOR 20 >
See also
get-color-alias-translation
get-color-spec

LispWorks Reference Manual (Windows version) - 14 Dec 2001

Next Prev Up Top Contents Index