W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2017

[csswg-drafts] [css-color-4] Spec doesn't specify whether implementation must honor <decimal> in rgb/rgba or if it can truncate to an <integer>

From: hichris1234 via GitHub <sysbot+gh@w3.org>
Date: Tue, 14 Nov 2017 15:08:16 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-273825773-1510672095-sysbot+gh@w3.org>
hichris1234 has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-color-4] Spec doesn't specify whether implementation must honor <decimal> in rgb/rgba or if it can truncate to an <integer> ==
[The RGB functions: rgb() and rgba()](https://drafts.csswg.org/css-color/#rgb-functions) states that:

> These values come from the fact that many graphics engines store the color channels internally as a single byte, which can hold integers between 0 and 255. However, the CSS syntax allows full \<number\>s, not just \<integer\>s, for authoring convenience.

However, this section of the spec is unclear as to whether an implementation must try to honor the color channels with decimals preserved or if the implementation can truncate/round the \<number\> to an integer. Edge has implemented this part of the spec, and appears to simply truncate the number. [Chromium is thinking about implementing it](https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/zH51Atd-Vag), but wants to clarify this section first.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1983 using your GitHub account
Received on Tuesday, 14 November 2017 15:08:18 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 14 November 2017 15:08:20 UTC