W3C home > Mailing lists > Public > public-css-archive@w3.org > January 2021

Re: [csswg-drafts] [css-color-4] What serialization should be used when using color(lab ...) syntax to specify a lab color? (#5825)

From: Chris Lilley via GitHub <sysbot+gh@w3.org>
Date: Mon, 18 Jan 2021 14:49:19 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-762296912-1610981358-sysbot+gh@w3.org>
Oh and [4.7.3. Serializing Lab and LCH values](https://drafts.csswg.org/css-color-4/#serializing-lab-lch) says

> The precision with which lab() component values are retained, and thus the number of significant figures in the serialized value, is not defined in this specification, but due to the wide gamut must be sufficient to round-trip L values between 0 and 100, and a and b values between ±127, with at least twelve bit precision; this will result in at least two decimal places unless trailing zeroes have been omitted. (16bit, or half float, is recommended for internal storage). Values must be rounded towards +∞, not truncated.

while [4.7.4. Serializing values of the color() function](https://drafts.csswg.org/css-color-4/#serializing-color-function-values) gives a minimum precision of 16 bits for `color(lab)` (and for `color(xyz)`.

Although that was the proposal agreed by CSSWG, looking at it again the minimum precision should be the same for the two syntactic forms, so the `twelve bits` should be increased to 16.

GitHub Notification of comment by svgeesus
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5825#issuecomment-762296912 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 18 January 2021 14:49:22 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:25 UTC