Skip to content

[css-color-hdr] Incomplete sample code for color conversions #9934

@svgeesus

Description

@svgeesus

Unlike CSS Color 4, which has complete sample code to convert each predefined color space to and from CIE XYZ-D65, CSS Color HDR currently lacks this. It currently documents:

  1. Converting from absolute luminance, linear-light BT.2100 RGB to PQ, and back
  2. Converting from absolute luminance, linear-light BT.2100 RGB to HLG, and back
  3. Converting from rectangular Jzazbz to polar JzCzHz, and back

It is possible to infer, from CSS Color 4, how to get from linear light, SDR BT.2020 but from there to absolute luminance HDR BT.2100 (which uses the same chromaticities and white point) is left as an exercise for the reader.

Converting from XYZ-D65 to Jzazbz (and back) and to ICtCp (and back) requires reading the Sadfar paper and BT.2100 respectively.

To aid implementers, the specification should provide full sample code to and from each predefined color space.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions