unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: simenheg@runbox.com, tom@tromey.com, 41544@debbugs.gnu.org
Subject: bug#41544: 26.3; Possible incorrect results from color-distance
Date: Wed, 10 Jun 2020 18:08:32 +0300	[thread overview]
Message-ID: <83mu5b5573.fsf@gnu.org> (raw)
In-Reply-To: <49B7D7B5-D9E3-4E97-A749-CF5E8D8EE2C6@acm.org> (message from Mattias Engdegård on Wed, 10 Jun 2020 16:51:24 +0200)

> From: Mattias Engdegård <mattiase@acm.org>
> Date: Wed, 10 Jun 2020 16:51:24 +0200
> Cc: Tom Tromey <tom@tromey.com>, simenheg@runbox.com, 41544@debbugs.gnu.org
> 
>  (defun readable-foreground-color (color)
>    "Return a readable foreground color for background COLOR."

Please make sure the doc string says that the function will return
either the black or the white color, depending on which one will
contrast better with COLOR.  Otherwise it is impossible to know,
without looking at the code, that this function can return only these
two colors.

Other than that, I'm okay with the following parts of your patch:

  . the changes in list-colors-print
  . the addition of color-dark-p and the change in
    readable-foreground-color to use it
  . the replacement of css--contrasty-color with
    readable-foreground-color (assuming Tom doesn't object)

Please don't install anything else.

Thanks.





  reply	other threads:[~2020-06-10 15:08 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-26 16:29 bug#41544: 26.3; Possible incorrect results from color-distance Simon Pugnet
2020-05-28 17:31 ` Mattias Engdegård
2020-05-29 15:17   ` Mattias Engdegård
2020-05-29 15:36     ` Eli Zaretskii
2020-05-29 17:28       ` Mattias Engdegård
2020-05-29 17:52     ` Tom Tromey
2020-05-31 20:46       ` Mattias Engdegård
2020-06-01 16:32         ` Eli Zaretskii
2020-06-01 17:24           ` Mattias Engdegård
2020-06-01 17:35             ` Eli Zaretskii
2020-06-01 17:44               ` Eli Zaretskii
2020-06-02 15:27                 ` Mattias Engdegård
2020-06-02 16:14                   ` Eli Zaretskii
2020-06-02 20:41                     ` Mattias Engdegård
2020-06-03 14:24                       ` Eli Zaretskii
2020-06-03 15:01                         ` Mattias Engdegård
2020-06-03 15:59                           ` Eli Zaretskii
2020-06-03 20:08                             ` Mattias Engdegård
2020-06-04 14:07                               ` Eli Zaretskii
2020-06-04 15:29                                 ` Mattias Engdegård
2020-06-05 12:27                                   ` Eli Zaretskii
2020-06-05 15:50                                     ` Mattias Engdegård
2020-06-06  7:29                                       ` Eli Zaretskii
2020-06-06 10:59                                         ` Mattias Engdegård
2020-06-06 11:59                                           ` Eli Zaretskii
2020-06-06 13:29                                             ` Mattias Engdegård
2020-06-06 13:57                                               ` Eli Zaretskii
2020-06-06 16:54                                                 ` Mattias Engdegård
2020-06-06 18:15                                                   ` Drew Adams
2020-06-07  9:13                                                     ` Mattias Engdegård
2020-06-07 14:30                                                       ` Eli Zaretskii
2020-06-07 16:12                                                         ` Drew Adams
2020-06-09 12:19                                                         ` Mattias Engdegård
2020-06-07 16:00                                                       ` Drew Adams
2020-06-06 18:27                                                   ` Eli Zaretskii
2020-06-07  9:04                                                     ` Simen Heggestøyl
     [not found]                                                     ` <87pnabfdr5.fsf@simenheg@gmail.com>
2020-06-07 10:14                                                       ` Mattias Engdegård
2020-06-07 19:23                                                         ` Simen Heggestøyl
     [not found]                                                         ` <87d06ar87d.fsf@simenheg@gmail.com>
2020-06-07 19:27                                                           ` Mattias Engdegård
2020-06-08 18:39                                                             ` Simen Heggestøyl
2020-06-07 14:26                                                       ` Eli Zaretskii
2020-06-07 16:10                                                         ` Drew Adams
2020-06-07 19:26                                                         ` Simen Heggestøyl
2020-06-08 13:11                                                     ` Mattias Engdegård
2020-06-08 14:30                                                       ` Drew Adams
2020-06-08 19:53                                                         ` Mattias Engdegård
2020-06-10 18:37                                                           ` Drew Adams
2020-06-10 19:12                                                             ` Mattias Engdegård
2020-06-09 16:20                                                       ` Eli Zaretskii
2020-06-10 14:51                                                         ` Mattias Engdegård
2020-06-10 15:08                                                           ` Eli Zaretskii [this message]
2020-06-10 18:29                                                             ` Mattias Engdegård
2020-06-10 18:45                                                               ` Eli Zaretskii
2020-08-18 13:44                                                                 ` Lars Ingebrigtsen
2020-08-18 14:06                                                                   ` Eli Zaretskii
2020-08-18 14:10                                                                     ` Lars Ingebrigtsen
2020-08-18 14:19                                                                       ` Mattias Engdegård
2020-08-19 10:11                                                                         ` Lars Ingebrigtsen
2020-08-19 11:28                                                                           ` Mattias Engdegård
2020-08-19 11:34                                                                             ` Lars Ingebrigtsen
2020-08-18 14:51                                                                       ` Eli Zaretskii
2020-08-19 10:13                                                                         ` Lars Ingebrigtsen
2020-08-19 14:52                                                                           ` Eli Zaretskii
2020-08-19 15:03                                                                             ` Lars Ingebrigtsen
2020-08-19 17:15                                                                               ` Eli Zaretskii
2020-08-20 13:08                                                                                 ` Lars Ingebrigtsen
2020-08-21 11:32                                                                                   ` Mattias Engdegård
2020-08-22 13:22                                                                                     ` Lars Ingebrigtsen
2020-06-04  6:15                       ` Simon Pugnet
2020-06-04  8:57                         ` Mattias Engdegård
2020-06-01 19:46         ` Basil L. Contovounesios
2020-06-02 15:08           ` Mattias Engdegård

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83mu5b5573.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=41544@debbugs.gnu.org \
    --cc=mattiase@acm.org \
    --cc=simenheg@runbox.com \
    --cc=tom@tromey.com \
    /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 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).