mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-24 19:36:42 +00:00
Recolor Artwork: Undo Changes and Redo Changes step through the dialog's own color edits
Two buttons beside the Color Theme Picker go back and forward one color edit made in the open dialog: the rows, Colors, Method, the Preserve options, Limit to Library, the harmony rule, Global Adjust, the Color Theme Picker's picks and the Prominent Colors weights. The art previews each step. The dialog's history is separate from the document's: OK still records one undo step and Cancel discards the edits with their history. Each opening starts with nothing to undo, as the help page describes (https://helpx.adobe.com/illustrator/desktop/manage-colors/modify-colors/recolor-options-overview.html). VectorCraft's own rules: a change is one step once the pointer is released, so a drag is one step; Reset is a step of its own; a new edit after Undo Changes leaves nothing to redo; a button with no step to go to is disabled; the dialog keeps at most 64 steps and 4 MiB of them. ui.recolorUndo and ui.recolorRedo run the buttons and return {changed, canUndo, canRedo}.
This commit is contained in:
+14
@@ -4856,6 +4856,20 @@ dimmed, so art that mixes colors dims only its other colors, and nothing is dimm
|
||||
selected. Find changes only what the canvas shows: it records no undo step, Cancel leaves the art as it was, and OK
|
||||
applies every row to the art as it does with Find off.
|
||||
|
||||
The Undo Changes and Redo Changes buttons beside the Color Theme Picker (`ui.recolorUndo` and `ui.recolorRedo`) go
|
||||
back and forward one color edit made in the open dialog; Undo Changes has nothing to undo after the dialog is opened
|
||||
again ([Recolor options overview](https://helpx.adobe.com/illustrator/desktop/manage-colors/modify-colors/recolor-options-overview.html)).
|
||||
A step restores the rows, `colors`, `method`, the Preserve options, `limitTo`, `rule`, `globalAdjust`, `themePicks`
|
||||
and `weights`, and the art previews the result. Both commands return `{changed, canUndo, canRedo}` and are an error
|
||||
when Recolor Artwork is not open. VectorCraft's own rules: the dialog's history is separate from the document's undo
|
||||
history, which does not change until OK records the recolor as one undo step; Cancel discards the history with the
|
||||
edits. A change is one step once the pointer is released, so a drag on the wheel, a slider or the Prominent Colors bar
|
||||
is one step, and an action that changes none of those fields is no step. Reset is a step of its own, which Undo
|
||||
Changes reverses. A new edit after Undo Changes leaves nothing to redo. Switching tabs, displays or slider modes,
|
||||
selecting rows, Find and Preview make no step. The dialog keeps at most 64 steps and 4 MiB of them as JSON, dropping
|
||||
the oldest first. A button with no step to go to is disabled. Save All Colors and Save Prominent Colors add a color
|
||||
group to the document at once, as its own undo step, and Undo Changes leaves that group in place.
|
||||
|
||||
The `recolor.*` commands refuse parameters of the wrong form. A `limitTo` or `method` that is not a string gets the
|
||||
error for an unknown library or method. Other wrong-form parameters get an error that names them.
|
||||
`includeImages`, `includePatterns`, a row's `exclude`, `order`, `saturationBrightness` and the `white`, `black` and
|
||||
|
||||
@@ -1766,6 +1766,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
- **Recolor Artwork brightness and hue wheel:** a button under the Edit tab's wheel tools switches the wheel between hue with saturation and hue with brightness; a marker's angle sets its hue, and its distance from the center sets the component the wheel shows ([Recolor options overview](https://helpx.adobe.com/illustrator/desktop/manage-colors/modify-colors/recolor-options-overview.html), [archived help, Edit colors](https://help.adobe.com/archive/en_US/illustrator/cs5/illustrator_cs5_help.pdf#page=144)). VectorCraft's own rules: brightness runs from black at the center to full at the edge, the segmented wheel's five rings become brightness steps, the slider under the wheel edits the component the wheel leaves out (Saturation on the brightness wheel), Add Color takes the hue and brightness clicked at the base color's saturation, the choice holds for both wheels while the dialog is open and the button is off for the color bars, and each opening shows hue and saturation. `wheelAxes` (`hueSaturation`, `hueBrightness`) is the dialog field. Tests: `the_brightness_and_hue_wheel_swaps_the_wheel_axis_and_the_slider`, `a_marker_on_the_brightness_wheel_sets_hue_and_brightness`, `the_add_color_tool_on_the_brightness_wheel_adds_the_brightness_clicked` and `the_segmented_brightness_wheel_has_24_hues_by_5_brightnesses` in `crates/ui-egui/src/tests/recolor.rs`, and `an_added_color_on_the_brightness_wheel_takes_the_base_colors_saturation` in `crates/ui-egui/src/dialogs/recolor.rs`. Scores and estimates unchanged.
|
||||
- **Recolor Artwork Find:** the Assign tab's Find button finds the colors of the selected rows in the art ([Advanced recolor options overview](https://helpx.adobe.com/illustrator/desktop/manage-colors/learn-color-basics/edit-colors-dialog-overview.html)): while it is on, their art shows as the preview shows it and the rest of the selected art shows dimmed, until a second click ([archived help, Recolor Artwork](https://help.adobe.com/archive/en_US/illustrator/cs5/illustrator_cs5_help.pdf#page=149)). VectorCraft's own rules: a dimmed color is a 25% tint of its current color (or the nearest lighter tint when that one is a color a selected row lists), a color a selected row also lists is not dimmed, and Find records no undo step. `findColors` is the dialog field. Tests: `find_dims_the_colors_of_the_rows_not_selected` and `find_shows_the_selected_rows_art_and_dims_the_rest` in `crates/ui-egui/src/dialogs/recolor.rs`. Scores and estimates unchanged.
|
||||
- **Recolor Artwork New Row:** the Assign tab's New Row button adds a row with no current colors, so current colors can be moved into it and take its new color ([Advanced recolor options overview](https://helpx.adobe.com/illustrator/desktop/manage-colors/learn-color-basics/edit-colors-dialog-overview.html), [Assign new colors to selected artworks](https://helpx.adobe.com/illustrator/desktop/manage-colors/modify-colors/assign-new-colors-to-selected-artwork.html)). VectorCraft's own rules: the row goes above the first selected row (at the top when none is selected) with that row's new color and becomes the selection, and Merge with it as the first selected row moves the other rows' colors into it. The button needs selected art. An empty row recolors nothing, does not count toward Colors, adds no library swatch and gives a rewritten color group no color. While it is empty, Save All Colors and a new color group saved from colors alone leave its new color out, the Edit tab's wheel, bars and chips do not show it and its sliders edit the base color instead, the harmony rules and linked moves leave its new color as it is, and the Color Theme Picker gives it no color. Tests: `a_new_row_goes_above_the_selection_and_takes_merged_colors`, `an_empty_row_gives_the_group_no_color`, `an_empty_row_gives_a_new_group_no_color`, `an_empty_row_takes_no_harmony_or_wheel_color`, `theme_picks_leave_an_empty_row_out`, `save_all_colors_leaves_an_empty_row_out` and `colors_merged_into_a_new_row_take_its_new_color` in `crates/ui-egui/src/dialogs/recolor.rs`, `an_empty_row_recolors_nothing` and `an_empty_row_adds_no_swatch_and_no_group_color` in `crates/engine/src/tests/recolor.rs`.
|
||||
- **Recolor Artwork Undo Changes and Redo Changes:** two buttons beside the Color Theme Picker go back and forward one color edit made in the open dialog, and Undo Changes has nothing to undo after the dialog is opened again ([Recolor options overview](https://helpx.adobe.com/illustrator/desktop/manage-colors/modify-colors/recolor-options-overview.html)); `ui.recolorUndo` and `ui.recolorRedo` run them. VectorCraft's own rules: the dialog's history is separate from the document's, which changes only when OK records one undo step; a drag is one step, Reset is a step of its own, a new edit leaves nothing to redo, a button with no step to go to is disabled, and the dialog keeps at most 64 steps and 4 MiB of them. Tests: `undo_and_redo_changes_step_through_the_dialogs_own_edits`, `a_drag_is_one_step_of_undo_changes`, `undo_changes_reverses_reset` and `the_recolor_undo_and_redo_commands_step_the_open_dialog` in `crates/ui-egui/src/tests/recolor.rs`, and `undo_changes_keeps_a_bounded_history` in `crates/ui-egui/src/dialogs/recolor.rs`. Scores and estimates unchanged.
|
||||
- **Edit Colors parameters:** `edit.colors.saturate` needs a number `intensity`, the value from -100% to 100% that Saturate takes ([Adjusting colors](https://web.archive.org/web/20230128232631/https://helpx.adobe.com/illustrator/using/adjusting-colors.html)), and answers "missing number `intensity`" without one; a number outside the range counts as its nearest end. A value that is not a number, such as `"40"`, is refused with `` `intensity` must be a number, not "40" ``, as in every command that needs a number (`tests::params::a_malformed_required_number_is_not_reported_as_missing`). `edit.colors.adjustBalance` refuses a channel and `color.harmony` refuses `steps` or `amount` that is not a number; both read `null` as a value left out. `tests::editcolors` and `tests::colorguide` cover them.
|
||||
- **Convert to Indexed Color:** Edit › Edit Colors › Convert to Indexed Color… (`edit.colors.toIndexed`) stores the embedded images in the selection as indexed-color PNGs of at most 256 colors. The palette is chosen as for a PNG-8 export, as evenly spaced levels of red, green and blue, or from the document's swatches, with diffusion, pattern or noise dithering; pixels under half opacity become transparent. The dialog previews live, and OK is one undo step. This is VectorCraft's own command and counts toward no score. `tests::editcolors` and `encode::tests_palette` cover it. Scores and estimates unchanged.
|
||||
- **Working RGB numeric controls:** the Color panel and Color Picker read RGB, HSB, hex and Web Safe RGB values in the active working RGB space. Editing one RGB channel preserves the other native channels, including colors outside display sRGB. Regressions cover sRGB, Display P3, Wide Gamut RGB and ProPhoto RGB, picker initialization, native numeric round trips, and a slider click with one Undo step. Scores and estimates unchanged.
|
||||
|
||||
Reference in New Issue
Block a user