Color Wheel: HSL Sliders edit a color by hue, saturation and lightness

Part of #978. The Color Wheel panel menu gains HSL Sliders, shown in
place of OKLCH Sliders: H (0 to 360°), S and L (0 to 100 %) rows under
the wheel or the box that edit the hue, saturation and lightness of the
color's display sRGB, as CSS Color 4 defines HSL
(https://www.w3.org/TR/css-color-4/#the-hsl-notation). A pick goes into
the working RGB space as the wheel's picks do, the rows keep the hue of
a gray, and they take the arrow keys and report their names, values and
ranges to screen readers as the OKLCH rows do.

- vectorcraft-color: rgb_to_hsl and hsl_to_rgb follow the conversions
  in CSS Color 4 sections 7.1 and 7.2, with Color::to_hsl and
  Color::from_hsl beside to_hsb and from_hsb.
- ui.colorWheel takes sliders: "hsl"; an unknown value now answers
  "`sliders` must be none, oklch or hsl".
- Docs: docs/mcp.md, docs/control-protocol.md and the Color Wheel
  evidence in docs/target-app-parity.md.
This commit is contained in:
dotCooCoo
2026-11-15 22:12:47 -08:00
parent 42415d9a97
commit f5e9840333
36 changed files with 461 additions and 51 deletions
+3 -3
View File
@@ -266,9 +266,9 @@ Color Wheel panel (`window.panel {panel: "colorWheel"}`): a hue ring around a sa
pick runs the commands the Color panel's sliders run: `paint.setFill` or `paint.setStroke` with `keepModel`,
`paint.editGradient` for a gradient's selected stop, and `paint.freeform.setPoint` for a freeform gradient's selected
point (the first stop or point when none is selected). `ui.colorWheel {view?, channel?, sliders?}` shows the wheel or
the box (a color field with a channel strip at its right), picks the box's channel, and shows or hides OKLCH Sliders
(`sliders: "oklch"` is an error while the working RGB space is not sRGB); it returns the settings, and `ui.inspect`
reports them as `ui.color_wheel`.
the box (a color field with a channel strip at its right), picks the box's channel, and shows OKLCH Sliders, HSL
Sliders or neither (`sliders: "oklch"`, `"hsl"` or `"none"`; `"oklch"` is an error while the working RGB space is not
sRGB); it returns the settings, and `ui.inspect` reports them as `ui.color_wheel`.
Edit Colors dialogs: `ui.colorBalanceDialog` opens Adjust Colors (`colorBalance`: fields `mode` `gray`/`rgb`/`cmyk`/
`global`, the channels `r` `g` `b` / `c` `m` `y` `k` / `gray` / `tint` (global mode) from −100 to 100, `convert`, `fill`, `stroke`,