mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-24 18:32:23 +00:00
Color Wheel: fix OKLCH and HSL slider review findings
- The largest chroma at a hue near a primary color finds the stretch past
the first gamut edge, so pure blue at chroma 0.4 stays blue. The C track
dims the gap between the two stretches.
- Oklab conversions use the signed sRGB transfer curve for channels below 0.
- HSL hues wrap before the channel offsets; Color::to_hsl and from_hsl are
removed, so callers pass the color settings themselves.
- color.convert {to: "oklch"} clips RGB numbers past 0 to 1, as hex does.
- A hue on a gray, or a saturation on black or white, leaves a Gray paint
unchanged and records no undo step.
- Remembered row and wheel components are dropped once the panel shows
another color or target.
- Hiding or switching the rows during a row drag keeps the preview as one
undo step and ends the interaction.
- The L and H tracks keep their colors until the other two components
change, so a frame does not search the gamut for every track color.
- Docs name the document's assigned profile as the RGB space OKLCH Sliders
need, and give color.convert's example its color.
This commit is contained in:
@@ -270,8 +270,8 @@ pick runs the commands the Color panel's sliders run: `paint.setFill` or `paint.
|
||||
`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 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`.
|
||||
Sliders or neither (`sliders: "oklch"`, `"hsl"` or `"none"`; `"oklch"` is an error while the active document's RGB
|
||||
space, its assigned profile or else 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`,
|
||||
|
||||
Reference in New Issue
Block a user