emacs-devel
[Top][All Lists]
Advanced

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

Re: color-grey-p and black?


From: Eli Zaretskii
Subject: Re: color-grey-p and black?
Date: Wed, 28 Sep 2005 21:32:26 +0300

> From: "Richard M. Stallman" <address@hidden>
> Date: Wed, 28 Sep 2005 13:10:46 -0400
> Cc: address@hidden
> 
>     if (defined_color (f, color_name, &color, 0))
> !     gray_p = (/* Any color sufficiently close to black counts as grey.  */
> !           (color.red < 5000 && color.green < 5000 && color.blue < 5000)
> !           ||
> !           ((abs (color.red - color.green)
> !             < max (color.red, color.green) / 20)
> !            && (abs (color.green - color.blue)
> !                < max (color.green, color.blue) / 20)
> !            && (abs (color.blue - color.red)
> !                < max (color.blue, color.red) / 20)));

Wouldn't it be better to simply replace "<" with "<=" in all 3
comparisons?  That seems to me like a less radical change.




reply via email to

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