[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Doc string and operation of color-distance
From: |
Eli Zaretskii |
Subject: |
Re: Doc string and operation of color-distance |
Date: |
Fri, 15 Sep 2017 16:30:05 +0300 |
> Date: Thu, 14 Sep 2017 15:12:26 -0400
> From: Mark Oteiza <address@hidden>
> Cc: address@hidden
>
> On 14/09/17 at 09:45pm, Eli Zaretskii wrote:
> > 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
>
> No, the 'nil' is correct--if no metric is given as an argument,
> color_distance is used which, as the comments say, is a modified L*u*v*
> metric.
Yes, but the comments also reference the article which describes the
metric, whereas the doc string doesn't.
I think we should either leave the nil case alone -- it wasn't
documented before in such detail -- or add more explanations and
perhaps the reference.
What's important is to describe the non-nil case.