GNU Info

Info Node: (sawfish.info)Colors

(sawfish.info)Colors


Next: Fonts Prev: News Up: Top
Enter node , (file) or (file)node

Colors
******

   Sawfish provides a primitive type allowing colors to be represented.
Each color object allows a single color value to be named and passed
between Lisp functions.

 - Function: colorp arg
     Returns `t' when ARG is a member of the color type.

 - Function: get-color name
     Returns the color object representing the color specified by the
     string NAME. This is according to the standard X11 color
     specifiers, either a named color from the `rgb.txt' database, or a
     string defining the red, green and blue components of the color,
     either eight or sixteen bits in hexadecimal, i.e. `#RRGGBB' or
     `#RRRRGGGGBBBB'.

     Signals an error if no known color has the name NAME.

 - Function: get-color-rgb red green blue
     Return the color object representing the color with RGB components
     as specified (each component ranging from 0 to 65535).

   Given a color object, it's possible to find both the actual rgb
values defining the color and one of the names that X11 uses to refer
to the color.

 - Function: color-rgb color
     Return a list of integers `(RED GREEN BLUE)' the actual color
     values of the color represented by object COLOR. The individual
     values range from 0 to 65535.

 - Function: color-name color
     Return a string defining one of the X11 names used to specify the
     color represented by the color object COLOR. Note that this may
     well be different to the name used when the color was originally
     allocated.

   Where a color object is used to define the foreground color of a
piece of text, the `default-foreground' color provides the default value
used if no actual color is specified.

 - Variable: default-foreground
     The color used for text where no other color is defined.


automatically generated by info2www version 1.2.2.9