Next Prev Up Top Contents Index

11.2 Reading the color database

To find out what colors are defined in the color database, use the following functions:

apropos-color-names

Function

apropos-color-names substring

This returns a list of symbols whose symbol-names contain substring and which are present in the color-database defining color aliases. By convention these are in the keyword package.

TEST-4> (color:apropos-color-names "RED")
 (:ORANGERED3 :ORANGERED1 :INDIANRED3 :INDIANRED1
  :PALEVIOLETRED :RED :INDIANRED :INDIANRED2
  :INDIANRED4 :ORANGERED :MEDIUMVIOLETRED
  :VIOLETRED :ORANGERED2 :ORANGERED4 :RED1 :RED2 :RED3
  :RED4 :PALEVIOLETRED1 :PALEVIOLETRED2 :PALEVIOLETRED3
  :PALEVIOLETRED4 :VIOLETRED3 :VIOLETRED1 :VIOLETRED2
  :VIOLETRED4)

apropos-color-alias-names

Function

apropos-color-alias-names substring

This functions like apropos-color-names but returns only those symbols that have been defined as color aliases.

apropos-color-spec-names

Function

apropos-color-spec-names substring

This functions like apropos-color-names but returns only those symbols that were defined as original entries in the color database.

get-all-color-names

Function

get-all-color-names &optional sort

This returns a list of all color-names in the color database. By convention these are symbols in the keyword package. The returned list is alphanumerically sorted on the symbol-names if the optional argument is non- nil .


LispWorks CAPI User Guide - 14 Dec 2001

Next Prev Up Top Contents Index