Recolor Artwork: Edit tab right-click menus set the base color, pick a shade and add colors

A right-click on a wheel marker or a color bar offers Set As Base Color,
Select Shade (a 7 by 7 grid of the color's hue), Color Picker and Remove
Color. A right-click elsewhere on the wheel offers Add New Color, and a
color added on a marker's line moves with that marker while the colors
are unlinked. Set Current Color As Base Color makes the selected color
the base.

The base color is stored on its row (`base: true`) instead of being the
first selected row, so the harmony rules build from it whichever color
is selected for the sliders. Merge, Separate, Randomize and Prominent
Colors keep the marks, and the rows sent to `recolor.apply` leave them
out.
This commit is contained in:
dotCooCoo
2026-11-15 09:07:57 -08:00
parent a6b73c467d
commit c0550a00a7
34 changed files with 812 additions and 51 deletions
+14 -4
View File
@@ -291,13 +291,23 @@ colors; colors opened alone are saved as a group with the change. `display` sets
colors: `smooth` (the smooth wheel, also when unset; each opening starts there), `segmented` (a wheel of solid patches,
24 hues by 5 saturations, whose markers move as freely) or `bars` (a solid bar per recolored color in row order; a click
selects its row for the sliders and a drag moves the row without changing a color). `wheelTool` turns on a wheel tool
on either wheel: `add` (the Add Color tool) adds a click as a new color, the hue and saturation clicked at the base
color's brightness (the patch's color on the segmented wheel), in a new row with no current colors (`from: []`) and
`added: true` that becomes the selected row; `remove` (the Remove Color tool) removes the color of the marker clicked. A color bar's
right-click menu has Remove Color too. The base color can't be removed. A removed color's row is dropped, unless it
on either wheel: `add` (the Add Color tool) adds a click as a new color, the hue and saturation clicked at the selected
color's brightness (the base color's when none is selected; the patch's color on the segmented wheel), in a new row with no current colors (`from: []`) and
`added: true` that becomes the selected row; `remove` (the Remove Color tool) removes the color of the marker clicked. The base color can't be removed. A removed color's row is dropped, unless it
has current colors and art or a group is open: it then keeps them with `to: null`, that art keeps its colors, and the
group's swatch at that place is removed. A row with no current colors recolors no art; with a group, the new color of
one with `added: true` is added to the group after the group's other colors, and a row made with New Row adds none.
The base color is the row with `base: true`, or the first color the Edit tab shows when no row has it; the harmony rules
build from it, and selecting another color for the sliders leaves it the base. A right-click on a wheel marker or a
color bar opens a menu with Set As Base Color (moves `base: true` to that row), Select Shade (a grid of the color's hue
at 7 saturations, 0% to 100%, by 7 brightnesses, 100% down to 14%; a click moves the color there as a drag of its
marker would, so linked colors follow), Color Picker and Remove Color; the base color's menu has neither Set As Base
Color nor Remove Color. A right-click elsewhere on either wheel offers Add New Color, which adds a color as the Add
Color tool does. A color added on the line from the centre to a marker moves with that marker while the colors are
unlinked: the marker's row gets `tie: n` and the added row `follows: n`, and dragging the marker, or Select Shade on
it, moves every row that follows its `tie` by the same change. Set Current Color As Base Color, before the color chips,
makes the selected color the base. The rows keep these marks when Randomize (`recolor.randomize`) or Prominent Colors
(`recolor.weigh`) changes them, and the rows the dialog sends `recolor.apply` leave `base`, `tie` and `follows` out.
Setting `colors`, a preserve flag or `limitTo` reduces the rows again (also on `ui.dialog.confirm`). The dialog previews
`recolor.apply` on the canvas; confirm keeps it as one undo step (with a group, the group is rewritten in the same
step; with no art selected only the group changes). In the Swatches panel, double-clicking a colour group's folder,