Recolor with Preset: test that grays of different lightness get different tints

The 1 Color Job test now requires a strictly higher tint on the darker of
two grays for a linked ink, and different colors for a process swatch, so
a flat tint fails it. docs/ui-parity.md gets a Recolor with Preset item
and the M3 row in docs/roadmap.md names the preset flow.
This commit is contained in:
dotCooCoo
2026-11-22 11:14:02 -08:00
parent f7b7ca5f86
commit da5344af2c
3 changed files with 12 additions and 6 deletions
+9 -5
View File
@@ -2157,14 +2157,18 @@ fn a_one_color_job_limited_to_document_swatches_links_gray_art_to_the_ink() {
for (i, c) in before.iter().enumerate().filter(|(i, _)| !grays.contains(i)) {
assert_eq!(after[i].0, c.0, "{kind}: black and white are kept");
}
if linked {
for &a in &grays {
for &b in &grays {
if gray(&before[a].0) < gray(&before[b].0) {
assert!(after[a].2 >= after[b].2, "{kind}: a darker gray takes more ink: {:?} {:?}", after[a], after[b]);
for &a in &grays {
for &b in &grays {
if gray(&before[a].0) < gray(&before[b].0) {
if linked {
assert!(after[a].2 > after[b].2, "{kind}: a darker gray takes more ink: {:?} {:?}", after[a], after[b]);
} else {
assert_ne!(after[a].0, after[b].0, "{kind}: grays of different lightness get different colors: {a} {b}");
}
}
}
}
if linked {
app.run("swatch.edit", json!({"name": "Ink", "color": "cmyk 100 0 0 0"})).unwrap();
let edited = art_paints(&app);
for &i in &grays {
+1 -1
View File
File diff suppressed because one or more lines are too long
+2
View File
@@ -580,6 +580,8 @@ next unit in the order a right-click on a ruler lists them, from Feet back to Po
- [x] Recolor Artwork › Assign: double-click a row's new color to pick it in the Color Picker, in the model it was picked in, with native Lab entry, swatch libraries access in the picker, and row context menu options (Pick from Swatches, Limit to Library) (#8031, follow-up to #4090/#5113 for #4028). Evidence: `native_lab_entry_in_color_picker` and `row_context_menu_pick_from_swatches_and_limit_to_library` exercise numeric entry and actual menu clicks.
- [x] Edit › Edit Colors › Recolor with Preset: the 1, 2 and 3 Color Job and Color Library presets first open a Recolor with Preset dialog whose Limit to Library menu (None, Document Swatches or a library) is applied when Recolor Artwork opens; Cancel opens nothing. A 1 Color Job limited to the document's swatches with a spot or global ink picked turns gray art into tints of that ink linked to its swatch. Evidence: `recolor_with_preset_asks_for_a_library_first` and `a_one_color_job_limited_to_document_swatches_links_gray_art_to_the_ink`.
- [x] Recolor Artwork › Color Theme Picker: with the button beside the tabs on, a click on the canvas takes the color palette of an object or image, a drag takes the palette of the art inside its marquee, and Shift adds more picks; the rows that aren't excluded take the palette as their new colors and the art previews them ([Recolor artwork](https://helpx.adobe.com/illustrator/desktop/manage-colors/modify-colors/recolor-artwork.html)). The number and order of the picked colors are VectorCraft's own rule (`recolor.pickTheme`). Tests: `theme_picks_give_the_rows_the_palette_of_the_art_picked` and `the_theme_picker_takes_clicks_and_shift_drags_on_the_canvas` in `crates/ui-egui/src/dialogs/recolor.rs`, `theme_picker_*` in `crates/engine/src/tests/recolor.rs`.
- [x] Recolor Artwork › Prominent Colors: with art, a bar under the Edit tab's wheel shows the new colors, each as wide as its share of the art; dragging the edge between two parts raises one color's weight and lowers the other's, and the art previews the result; the New Color Group menu has Save All Colors and Save Prominent Colors ([Recolor options overview](https://helpx.adobe.com/illustrator/desktop/manage-colors/modify-colors/recolor-options-overview.html)). How a share is measured and how a weight moves colors between rows are VectorCraft's own rules (`recolor.weigh`). Tests: `weights_move_the_rows_colors_and_the_art_previews_them`, `dragging_a_prominent_edge_moves_colors_between_rows` and `save_all_and_prominent_colors_make_color_groups` in `crates/ui-egui/src/dialogs/recolor.rs`, `weigh_*` in `crates/engine/src/tests/recolor.rs`.