[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 6eeab90632: Don't accept whitespace or hex floats in rgbi: co
From: |
Philip Kaludercic |
Subject: |
Re: master 6eeab90632: Don't accept whitespace or hex floats in rgbi: colour specs |
Date: |
Mon, 07 Mar 2022 09:26:41 +0000 |
Po Lu <luangruo@yahoo.com> writes:
> Mattias Engdegård <mattiase@acm.org> writes:
>
>> It's bug#54263 -- sorry about the omission from the log message.
>
> Thanks.
>
>> So it might seem, but over-tolerant implementation is generally a
>> mistake. It restricts compatibility in the other direction (what
>> worked with Emacs won't work elsewhere)
>
> AFAICT, there are no other implementations of such an rgbi color
> specification (please correct me if I'm wrong.)
It seems the "rgbi" (that stands for RGB Intensity) syntax comes from
X11[0], specifically "XCMS" (X Color Management System) Interestingly
enough, if you look around you can find that the "rgbi" prefix seems
to be case-insensitive[1], while `color-values-from-color-spec' is not:
(color-values-from-color-spec "rgbi:0/0/0") ;; => (0 0 0)
(color-values-from-color-spec "rgbI:0/0/0") ;; => nil
(color-values-from-color-spec "RGBi:0/0/0") ;; => nil
(color-values-from-color-spec "RGBI:0/0/0") ;; => nil
The closes thing to a specification I could find was [2], that says:
1.3.2.2. RGB Intensity String Specification
An RGB intensity specification in the form of a string is
identified by the prefix "rgbi:" and whose string conforms
to the following syntax:
rgbi:<red>/<green>/<blue>
Where red, green, and blue are floating point values between
0.0 and 1.0, inclusive. The input format for these values
is an optional sign, a string of numbers possibly containing
a decimal point, and an optional exponent field containing
an E or e followed by a possibly signed integer string.
[0] https://man.archlinux.org/man/extra/libx11/XLookupColor.3.en.
[1] https://www.niksula.hut.fi/~jkirma/books/xlib.pdf, section 7.2.2,
https://www.klauser.ch/lxug/ch14.pdf, page 18.
[2] http://www.nic.funet.fi/pub/X11/X11R4/DOCS/color/Xcms.text
--
Philip Kaludercic
- Re: master 6eeab90632: Don't accept whitespace or hex floats in rgbi: colour specs, Po Lu, 2022/03/06
- Re: master 6eeab90632: Don't accept whitespace or hex floats in rgbi: colour specs, Mattias Engdegård, 2022/03/06
- RE: [External] : Re: master 6eeab90632: Don't accept whitespace or hex floats in rgbi: colour specs, Drew Adams, 2022/03/06
- Re: master 6eeab90632: Don't accept whitespace or hex floats in rgbi: colour specs, Po Lu, 2022/03/06
- Re: master 6eeab90632: Don't accept whitespace or hex floats in rgbi: colour specs,
Philip Kaludercic <=
- Re: master 6eeab90632: Don't accept whitespace or hex floats in rgbi: colour specs, Po Lu, 2022/03/07
- Re: master 6eeab90632: Don't accept whitespace or hex floats in rgbi: colour specs, Philip Kaludercic, 2022/03/07
- Re: master 6eeab90632: Don't accept whitespace or hex floats in rgbi: colour specs, Mattias Engdegård, 2022/03/07
- Re: master 6eeab90632: Don't accept whitespace or hex floats in rgbi: colour specs, Po Lu, 2022/03/07
- Re: master 6eeab90632: Don't accept whitespace or hex floats in rgbi: colour specs, Mattias Engdegård, 2022/03/07
- Re: master 6eeab90632: Don't accept whitespace or hex floats in rgbi: colour specs, Po Lu, 2022/03/07
- RE: [External] : Re: master 6eeab90632: Don't accept whitespace or hex floats in rgbi: colour specs, Drew Adams, 2022/03/07