unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Doc string and operation of color-distance
@ 2017-09-14 18:45 Eli Zaretskii
  2017-09-14 19:12 ` Mark Oteiza
  2017-09-14 19:43 ` Mark Oteiza
  0 siblings, 2 replies; 12+ messages in thread
From: Eli Zaretskii @ 2017-09-14 18:45 UTC (permalink / raw)
  To: Mark Oteiza; +Cc: emacs-devel

Mark, the new color-distance says something strange in its doc string:

  (color-distance COLOR1 COLOR2 &optional FRAME METRIC)

  Return an integer distance between COLOR1 and COLOR2 on FRAME.
  COLOR1 and COLOR2 may be either strings containing the color name,
  or lists of the form (RED GREEN BLUE), each in the range 0 to 65535 inclusive.
  If FRAME is unspecified or nil, the current frame is used.
  If METRIC is unspecified or nil, a modified L*u*v* metric is used.

The last sentence should say "non-nil", I think, and it should
document that METRIC is supposed to be a function of 2 colors.

Also, this is unexpected:

  (color-distance "red" "blue" nil 'lcms-cam02-ucs)
  => (error "Invalid color" "red")

I think the new lcms2 functions should support colors specified as
strings, because all the other color-related functions do.



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-09-15 17:26 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-14 18:45 Doc string and operation of color-distance Eli Zaretskii
2017-09-14 19:12 ` Mark Oteiza
2017-09-15 13:30   ` Eli Zaretskii
2017-09-15 16:45     ` Mark Oteiza
2017-09-15 17:24       ` Eli Zaretskii
2017-09-14 19:43 ` Mark Oteiza
2017-09-14 20:23   ` Mark Oteiza
2017-09-15 13:41     ` Eli Zaretskii
2017-09-15 13:40   ` Eli Zaretskii
2017-09-15 15:15     ` Mark Oteiza
2017-09-15 16:32     ` Mark Oteiza
2017-09-15 17:26       ` Eli Zaretskii

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).