[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>

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