Expose function that can convert color spaces to chrome
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox125 | --- | fixed |
People
(Reporter: tlouw, Assigned: tlouw)
References
(Depends on 1 open bug, Blocks 2 open bugs)
Details
Attachments
(1 external file)
This would allow things like devtools to convert between color formats/spaces with the calculations done on the platform side.
A use case is to implement InspectorUtils.colorTo(color, colorSpace) for use in the color picker to convert colors.
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 1•3 years ago
|
||
This will allow calling InspectorUtils.ColorTo("red", "lab") and
receive {color: "lab(54.3 80.8 69.9)", adjusted: false}.
Adjusted is set to true if the color was adjusted to fit into the sRGB
color space.
| Assignee | ||
Comment 2•3 years ago
|
||
We need the computed color values in the extended AbsoluteColor format as well as support for detecting/mapping gamut.
| Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 3•3 years ago
|
||
Adjusted is set to true if the color was adjusted to fit into the sRGB color space.
Is that for HSL/HWB? If so, that requirement is under discussion and likely to be dropped.
If it is for gamut mapping to screens, not all screens are sRGB - is there a different flag if it has been gamut mapped to, say, a P3 screen?
Updated•3 years ago
|
Updated•3 years ago
|
Comment 5•3 years ago
|
||
| Assignee | ||
Comment 6•3 years ago
|
||
Seems to be a strange Android only float serialization issue, will fix test.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 8•2 years ago
|
||
| bugherder | ||
Description
•