You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-color-4] Clarify which transfer function to use for color(rec2020 ...) #5907
From testing, it seems like CoreGraphics, the graphics library on macOS and iOS, uses the 0.45 when using the kCGColorSpaceITUR_2020 named color space. (This is not a blocker for us, I can perform the conversion manually, but it would be a bit unfortunate for CSS and CoreGraphics to disagree here, if people are trying to use color values interchangeably.)
I was discussing this with Chris Cameron from Google earlier this week. The unreferenced quote is from BT.2020-2, Parameter values for ultra-high definition television systems for production and international programme exchange page 5, note 4. Which seems to directly contradict the table on page 4 of the same specification. The notes is not saying what is correct, but rather what is commonly done and maybe good enough.
Having checked BT.2020 I am comfortable removing the note and referencing BT.2020 directly. Which as you point out is what the sample code already does. So it is more a case of updating the spec to match the sample code and BT.2020
From testing, it seems like CoreGraphics, the graphics library on macOS and iOS, uses the 0.45 when using the kCGColorSpaceITUR_2020 named color space.
To clarify, it uses that except for the linear portion near zero, right?
Activity
svgeesus commentedon Jan 29, 2021
I was discussing this with Chris Cameron from Google earlier this week. The unreferenced quote is from BT.2020-2, Parameter values for ultra-high definition television systems for production and international programme exchange page 5, note 4. Which seems to directly contradict the table on page 4 of the same specification. The notes is not saying what is correct, but rather what is commonly done and maybe good enough.
https://www.itu.int/rec/R-REC-BT.2020-2-201510-I/en
Having checked BT.2020 I am comfortable removing the note and referencing BT.2020 directly. Which as you point out is what the sample code already does. So it is more a case of updating the spec to match the sample code and BT.2020
I will update color.js to use 0.45 per spec, too.
[css-color 4] clarify rec2020 transfer function, see #5907
svgeesus commentedon Jan 29, 2021
To clarify, it uses that except for the linear portion near zero, right?
weinig commentedon Jan 29, 2021
Correct.
svgeesus commentedon Feb 4, 2021
fix sample code for rec2020 transfer function
svgeesus commentedon Feb 4, 2021
@weinig added WPT tests