Color Wheel: OKLCH Sliders edit a color by lightness, chroma and hue

The Color Wheel panel's menu gets OKLCH Sliders: L, C and H rows under the
wheel or the box that edit the color by the OKLCH lightness (0 to 100 %),
chroma (0 to 100 % of 0.4) and hue of its display sRGB, as CSS Color 4
defines them. Each track dims the colors outside sRGB, and a tick on the C
track marks the largest chroma that fits; a color outside sRGB keeps L and H
and takes that chroma. The rows are gray, and the menu item and
ui.colorWheel {sliders: "oklch"} are refused, while the working RGB space is
not sRGB. The choice is kept with the preferences.

- vectorcraft-color: oklab.rs with OKLCH conversions and max_chroma.
- color.convert {to: "oklch"} answers [L %, C, H°].
- ui.colorWheel takes sliders next to view and channel.

Docs: docs/mcp.md, docs/control-protocol.md, docs/target-app-parity.md.
This commit is contained in:
dotCooCoo
2026-11-14 08:24:33 -08:00
parent 22b8c6ce5a
commit f763b86fdc
43 changed files with 840 additions and 38 deletions
+3 -2
View File
@@ -265,8 +265,9 @@ My Themes tab lists the saved themes; every action runs a command (`colorTheme.s
Color Wheel panel (`window.panel {panel: "colorWheel"}`): a hue ring around a saturation and brightness square. A
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?}` shows the wheel or the box (a
color field with a channel strip at its right) and picks the box's channel; it returns the settings, and `ui.inspect`
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`.
Edit Colors dialogs: `ui.colorBalanceDialog` opens Adjust Colors (`colorBalance`: fields `mode` `gray`/`rgb`/`cmyk`/