unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: CHENG Gao <chenggao@gmail.com>
To: emacs-devel@gnu.org
Subject: Info about color-values need be revised
Date: Sun, 16 Aug 2009 18:14:29 +0800	[thread overview]
Message-ID: <m2prawkquy.fsf@cyberhut.org> (raw)


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	other threads:[~2009-08-16 10:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-16 10:14 CHENG Gao [this message]
2009-08-16 15:30 ` Info about color-values need be revised Drew Adams
2009-08-16 17:32   ` CHENG Gao
2009-08-19  3:47   ` YAMAMOTO Mitsuharu
2009-08-19  4:22     ` David Reitter
2009-08-19  4:57       ` YAMAMOTO Mitsuharu
2009-08-19 13:18     ` Stefan Monnier
2009-08-19 13:39     ` Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2prawkquy.fsf@cyberhut.org \
    --to=chenggao@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).