Subject: Re: bug#36304: 27.0.50; request: switch to the superior HTML #RGB convention for colors

From: Andy Moreton <[email-masked]>
Date: Fri, 28 Jun 2019 14:07:27 +0100

On Fri 28 Jun 2019, Pip Cet wrote:

> Updated patch attached.  Please let me know if you notice anything
> else in there that needs changing.

As this changes user-visible behaviour it should probably have a NEWS entry.

> @@ -2398,9 +2400,35 @@ x_query_frame_background_color (struct frame *f, XColor *bgcolor)
>  
>    if (color_name[0] == '#')
>      {
> -      /* The hex form is parsed directly by XParseColor without
> +      /* Don't pass #RGB strings directly to XParseColor, because that
> +	 follows the old convention of zero-extending each channel
> +	 value: #f00 means #f00000.  We want the new convention of
> +	 scaling channel values, so #f00 means #ff0000.
> +
> +	 So we translate #f00 to rgb:f/0/0, which X handles
> +	 differently. */

The use of "old" and "new" here is unclear.

Consider "old" -> "X" and "new" -> "emacs".

    AndyM