emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Info about color-values need be revised


From: CHENG Gao
Subject: Info about color-values need be revised
Date: Sun, 16 Aug 2009 18:14:29 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (darwin)

In ELISP manual, info about color-values is not true any more with NS
port merged.

,----[ (info "(elisp)Color Names") ]
|  -- Function: color-values color &optional frame
|      This function returns a value that describes what COLOR should
|      ideally look like on FRAME.  If COLOR is defined, the value is a
|      list of three integers, which give the amount of red, the amount
|      of green, and the amount of blue.  Each integer ranges in
|      principle from 0 to 65535, but some displays may not use the full
|      range.  This three-element list is called the "rgb values" of the
|      color.
| 
|      If COLOR is not defined, the value is `nil'.
| 
|           (color-values "black")
|                => (0 0 0)
|           (color-values "white")
|                => (65280 65280 65280)
|           (color-values "red")
|                => (65280 0 0)
|           (color-values "pink")
|                => (65280 49152 51968)
|           (color-values "hungry")
|                => nil
`----
It says return value is (R G B).


In NS port, color-values uses function xw-color-values:

,----[ C-h f xw-color-values RET ]
| xw-color-values is a built-in function in `nsfns.m'.
| 
| (xw-color-values color &optional frame)
| 
| Return a description of the color named color.
| The value is a list of integer RGBA values--(RED GREEN BLUE ALPHA).
| These values appear to range from 0 to 65280; white is (65280 65280 65280 0).
| The optional argument frame is currently ignored.
| 
| [back]
`----

The return value is (R G B Alpha).

So the info manual need be revised.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]