Open Bug 1814575 Opened 2 years ago Updated 2 years ago

[META] Adapt Spectrum (color picker widget) for CSS Color Module Level 4

Categories

(DevTools :: Shared Components, task)

task

Tracking

(Not tracked)

People

(Reporter: nchevobbe, Unassigned)

References

(Depends on 3 open bugs, Blocks 1 open bug)

Details

(Keywords: meta)

With those new functions outside of the rgb color space (lab, lch, …) we might need to change how our widget operates

At the moment, we can't manipulate those colors, picking something in the spectrum color box switches the value back to hexa
We might want to display a line to show the rgb space "borders". Having this might require us to shift to a canvas to render the color (which we might wanted anyway for showing contrast lines (Bug 1226069)

It might also be a good time to change our controls:

  • we could add a control to switch between color units (and color spaces for color())
  • we can only modify the hue and the opacity as "individual" components. We could have dedicated inputs for the different components instead
  • with the new color 4 syntax, we can also offer those components to be % or regular "old" numbers
  • have a simple button to copy the CSS stringified value to clipboard

Some resources:

Just as example, look like best LCH/OKLCH color picker for now:
https://oklch.com/

Depends on: 1824403
Depends on: 1824405
Depends on: 1824407
You need to log in before you can comment on or make changes to this bug.