mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-09 23:31:23 +00:00
Window › Color Wheel opens a new panel: the Fill and Stroke proxy beside a hue ring around a square with saturation across and brightness up at the ring's hue. It edits what the Color panel's sliders edit (the active proxy's color, the selected gradient stop or freeform point) through the same paint commands, and a drag is one undo step. Alt paints the other proxy, and Shift steps the ring by 45°. The Color panel does not change. A pick is display sRGB and goes into the working RGB space through the color settings. An RGB, CMYK or Lab color keeps its model, and a Gray color or a tint of a global swatch becomes a process color in the document's color mode. The wheel keeps the hue of the last pick while the objects, the proxy and the color are unchanged, so a drag through a gray and back keeps the hue. A press gives the ring or the square the keyboard focus. The arrow keys then step the hue by 1° or the saturation and brightness by 1%. With Shift a press steps ten times as far, and with Cmd/Ctrl it steps a tenth as far. Each press makes one undo step, and Escape or a click elsewhere gives the keys back to the tools. Screen readers read the ring as a slider from 0 to 360 with increment, decrement and set-value actions, and the square as its name and both values. The Color Picker's color field is the same widget, so it takes the same keys and reports its name and values. Color::to_hsb and Color::from_hsb now call the new rgb_to_hsb and hsb_to_rgb, which the panel uses on display sRGB numbers.