all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
Cc: alex@gnu.org, emacs-devel@gnu.org
Subject: Re: color-grey-p and black?
Date: Wed, 28 Sep 2005 21:32:26 +0300	[thread overview]
Message-ID: <u1x39hwlh.fsf@gnu.org> (raw)
In-Reply-To: <E1EKfSA-0001vI-80@fencepost.gnu.org> (rms@gnu.org)

> From: "Richard M. Stallman" <rms@gnu.org>
> Date: Wed, 28 Sep 2005 13:10:46 -0400
> Cc: emacs-devel@gnu.org
> 
>     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	other threads:[~2005-09-28 18:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-26 20:04 color-grey-p and black? Alex Schroeder
2005-09-28 17:10 ` Richard M. Stallman
2005-09-28 18:32   ` Eli Zaretskii [this message]
2005-09-29 14:10     ` Richard M. Stallman
2005-09-29 15:03       ` Daniel Brockman
2005-09-30 17:33         ` Richard M. Stallman

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

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

  git send-email \
    --in-reply-to=u1x39hwlh.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=alex@gnu.org \
    --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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.