unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Pip Cet <pipcet@gmail.com>
Cc: rms@gnu.org, 36304@debbugs.gnu.org
Subject: bug#36304: 27.0.50; request: switch to the superior HTML #RGB convention for colors
Date: Fri, 28 Jun 2019 11:12:29 +0300	[thread overview]
Message-ID: <83a7e2i0wi.fsf@gnu.org> (raw)
In-Reply-To: <CAOqdjBeA+53hFmOP-3qnuS53aMJGWMUMpz5iw9TGF1EqSrbO0Q@mail.gmail.com> (message from Pip Cet on Sat, 22 Jun 2019 15:33:14 +0000)

> From: Pip Cet <pipcet@gmail.com>
> Date: Sat, 22 Jun 2019 15:33:14 +0000
> Cc: rms@gnu.org, 36304@debbugs.gnu.org
> 
> > > > Yes, but we nowadays support text terminals that can display 24-bit
> > > > colors, and having their colors display differently from the same
> > > > color on X is just asking for bug reports.
> > > Okay, let's change it, then.
> > Thanks.
> 
> While I was there, I've also made it accept upper-case hex digits
> (previously, #0F0 was accepted but #F00 wasn't), and fixed the ranges
> so rgb:f/f/f translates to (65535 65535 65535) rather than (255 255
> 255).

Thanks.

A few comments:

> * lisp/term/tty-colors.el (tty-color-standard-values): Change
>   interpretation of #RGB strings to match CSS rather than X
>   conventions. Allow upper-case digits. Fix rgb:R/G/B interpretation.

Our convention is to use two spaces between sentences in documentation
and comments.  That includes log entries.

> -The returned value reflects the standard X definition of COLOR,
> +The returned value reflects the standard Emacs definition of COLOR,

This should include some reference to where "standard Emacs
definition" of colors can be found.  For X, we didn't need that,
because X docs is not our responsibility, and there's a plenty out
there.

> -    (cond ((and (>= len 4) ;; X-style "#XXYYZZ" color spec
> +    (cond ((and (>= len 4) ;; "#XXYYZZ" color spec

Is #XXYYZZ no longer considered "X-style"?

>  	   ;; Translate the string "#XXYYZZ" into a list
> -	   ;; of numbers (XX YY ZZ).  If the primary colors
> -	   ;; are specified with less than 4 hex digits,
> -	   ;; the used digits represent the most significant
> -	   ;; bits of the value (e.g. #XYZ = #X000Y000Z000).
> +	   ;; of numbers (XX YY ZZ).  If fewer than 4 hex
> +	   ;; digits are used, they represent the fraction
> +	   ;; of the maximum value (#XYZ = #XXXXYYYYZZZZ).

IMO, this part makes the text confusing: "4 hex digits" can be
interpreted as referring to the entire XXYYZZ thing, whereas you
really mean the number of digits for each primary color R, G, and B.
Also, I envision people who will struggle with the exact meaning of
"the fraction of the maximum value".  Where the previous text and the
example could be easily generalized to understand how we interpret
#ABCDEF, the proposed text, by giving an example only for a single hex
digit per primary color, does not lend itself to such an easy
generalization.

Finally, this is just part of the patch, isn't it?  The xterm.c part
is not here, and neither are the documentation parts.  Did I miss
something?





  reply	other threads:[~2019-06-28  8:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-20 11:22 bug#36304: 27.0.50; request: switch to the superior HTML #RGB convention for colors Pip Cet
2019-06-21  1:54 ` Richard Stallman
2019-06-22 11:23   ` Pip Cet
2019-06-22 11:40     ` Eli Zaretskii
2019-06-22 12:13       ` Pip Cet
2019-06-22 12:35         ` Eli Zaretskii
2019-06-22 14:41           ` Pip Cet
2019-06-22 15:05             ` Eli Zaretskii
2019-06-22 15:33               ` Pip Cet
2019-06-28  8:12                 ` Eli Zaretskii [this message]
2019-06-28  9:28                   ` Pip Cet
2019-06-28  9:42                     ` Robert Pluim
2019-06-28 10:00                       ` Pip Cet
2019-06-28 13:07                         ` Andy Moreton
2019-06-28 12:33                     ` Eli Zaretskii
2019-06-28 14:34                       ` Pip Cet
2019-06-28 19:54                         ` Eli Zaretskii
2019-06-28 21:27                         ` Andy Moreton
2019-07-22  2:46                           ` Pip Cet
2019-07-27 11:12                             ` Eli Zaretskii

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=83a7e2i0wi.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=36304@debbugs.gnu.org \
    --cc=pipcet@gmail.com \
    --cc=rms@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 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).