emacs-devel
[Top][All Lists]
Advanced

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

Doc string and operation of color-distance


From: Eli Zaretskii
Subject: Doc string and operation of color-distance
Date: Thu, 14 Sep 2017 21:45:45 +0300

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.



reply via email to

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