Color: Toggle RGB Percent switches the RGB units from the keyboard

The double-click right of an RGB field was the only way to switch R, G and B
between percent and 0 to 255 from the UI. ui.colorRgbPercent (Toggle RGB
Percent) is listed in the command palette and in Keyboard Shortcuts without a
default key, and switches the same setting. A parameter answers an error and
changes nothing. The label has a row in every complete catalog.
This commit is contained in:
dotCooCoo
2026-11-12 16:04:30 -08:00
parent 5494e1aaa7
commit d3375c1656
35 changed files with 101 additions and 5 deletions
+6
View File
@@ -1244,6 +1244,12 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[
"",
"{mode?: grayscale|rgb|hsb|cmyk|websafe, options?: bool, recentColors?: bool, rgbPercent?: bool} pick the Color panel's mode as its panel menu does (the active color converts to the mode's model as one undo step), Show Options (true) or Hide Options (false), check (true) or uncheck (false) Show Recent Colors, which shows or hides the panel's Recent Colors row (applied colors still join the list while it is hidden; the Swatches panel keeps its row), and show the RGB mode's R, G and B in percent (true) or from 0 to 255 (false), as a double-click right of an RGB field switches them (the color does not change; Web Safe RGB and the hex field stay in 0 to 255); all four are kept with the preferences; RGB, HSB, Web Safe RGB and hex values use the working RGB space (ui.inspect: ui.color_mode, ui.color_hide_options, ui.color_show_recent_colors, ui.color_rgb_percent) → {mode (null: none picked yet), options, recentColors, rgbPercent, shown: the mode the panel shows the color in, or tint for a tint of a global or spot swatch}",
),
(
"ui.colorRgbPercent",
"Toggle RGB Percent",
"",
"{} switch the Color panel's R, G and B between percent and 0 to 255, as a double-click right of an RGB field does (ui.colorPanel {rgbPercent}); the color does not change, and the choice is kept with the preferences; a parameter is an error and changes nothing → true when they show in percent",
),
(
"ui.savePdfDialog",
"Save PDF Dialog",
+1
View File
@@ -3209,6 +3209,7 @@ digits Malayalam Малаялам
Show Note Показване на бележка
Show Options Показване на опциите
Show Recent Colors Показване на скорошните цветове
Toggle RGB Percent Превключване на RGB в проценти
Show Original Path Показване на оригиналния път
Open this dialog with these settings next time Отваряне на този прозорец с тези настройки следващия път
Auto-Simplify Автоматично опростяване
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -1577,6 +1577,7 @@ digits Malayalam Malajalam
Select a text object to edit its character attributes. Odaberite tekstualni objekat da uredite njegove atribute znakova.
Show Options Prikaži opcije
Show Recent Colors Prikaži nedavne boje
Toggle RGB Percent Uključi/isključi RGB u postocima
Color Panel Options Opcije panela boja
Small Caps Mala velika slova
Small Caps (on the roadmap) Mala velika slova (u planu)
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -4172,6 +4172,7 @@ digits Malayalam Malaiàlam
Show Note Mostra la nota
Show Options Mostra les opcions
Show Recent Colors Mostra els colors recents
Toggle RGB Percent Commuta RGB en percentatge
Show Original Path Mostra el traçat original
Show Package Mostra el paquet
Show Panel Mostra el panell
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -1606,6 +1606,7 @@ digits Malayalam Malajálamské
Select a text object to edit its character attributes. Vyberte textový objekt, abyste mohli upravit atributy jeho znaků.
Show Options Zobrazit možnosti
Show Recent Colors Zobrazit nedávné barvy
Toggle RGB Percent Přepnout RGB v procentech
Color Panel Options Možnosti panelu Barva
Small Caps Kapitálky
Small Caps (on the roadmap) Kapitálky (v plánu)
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -1513,6 +1513,7 @@ digits Malayalam Malayalam
Select a text object to edit its character attributes. Markér et tekstobjekt for at redigere dets tegnattributter.
Show Options Vis indstillinger
Show Recent Colors Vis seneste farver
Toggle RGB Percent Skift RGB i procent
Small Caps Kapitæler
Small Caps (on the roadmap) Kapitæler (på vejkortet)
Standard Vertical Roman Alignment Standard lodret romersk justering
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -3269,6 +3269,7 @@ digits Malayalam Malayalam
Show Note Notiz einblenden
Show Options Optionen einblenden
Show Recent Colors Zuletzt verwendete Farben einblenden
Toggle RGB Percent RGB in Prozent umschalten
Show Original Path Originalpfad einblenden
Open this dialog with these settings next time Dieses Dialogfeld nächstes Mal mit diesen Einstellungen öffnen
Auto-Simplify Automatisch vereinfachen
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -3763,6 +3763,7 @@ digits Malayalam Μαλαγιάλαμ
Show Note Εμφάνιση σημείωσης
Show Options Εμφάνιση επιλογών
Show Recent Colors Εμφάνιση πρόσφατων χρωμάτων
Toggle RGB Percent Εναλλαγή RGB σε ποσοστό
Show Original Path Εμφάνιση αρχικής διαδρομής
Open this dialog with these settings next time Άνοιγμα αυτού του παραθύρου με αυτές τις ρυθμίσεις την επόμενη φορά
Auto-Simplify Αυτόματη απλοποίηση
Can't render this file because it is too large.
+1
View File
@@ -3300,6 +3300,7 @@ digits Malayalam Malayálam
Show Note Mostrar nota
Show Options Mostrar opciones
Show Recent Colors Mostrar colores recientes
Toggle RGB Percent Alternar RGB en porcentaje
Show Original Path Mostrar trazado original
Open this dialog with these settings next time Abrir este cuadro de diálogo con estos ajustes la próxima vez
Auto-Simplify Simplificar automáticamente
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -1580,6 +1580,7 @@ digits Malayalam Malajalam
Select a text object to edit its character attributes. Valitse tekstiobjekti, jonka merkkimääritteitä haluat muokata.
Show Options Näytä asetukset
Show Recent Colors Näytä viimeisimmät värit
Toggle RGB Percent Vaihda RGB prosentteina
Small Caps Kapiteelit
Small Caps (on the roadmap) Kapiteelit (suunnitteilla)
Standard Vertical Roman Alignment Tavallinen pystysuuntainen latinalainen tasaus
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -3292,6 +3292,7 @@ digits Malayalam Malayalam
Show Note Afficher la note
Show Options Afficher les options
Show Recent Colors Afficher les couleurs récentes
Toggle RGB Percent Basculer RVB en pourcentage
Show Original Path Afficher le tracé d’origine
Open this dialog with these settings next time Ouvrir cette boîte de dialogue avec ces réglages la prochaine fois
Auto-Simplify Simplifier automatiquement
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -4504,6 +4504,7 @@ antiAlias Sharp शार्प
Show Note नोट दिखाएं
Show Options ऑप्शन्स दिखाएँ
Show Recent Colors हाल के रंग दिखाएँ
Toggle RGB Percent RGB प्रतिशत में बदलें
Show Original Path मूल पाथ दिखाएं
Show Package पैकेज करें दिखाएँ
Show Panel शो पैनल
Can't render this file because it is too large.
+1
View File
@@ -3934,6 +3934,7 @@ mark-style Japanese Japán
Show Note Megjegyzés megjelenítése
Show Options Beállítások megjelenítése
Show Recent Colors Legutóbbi színek megjelenítése
Toggle RGB Percent RGB százalékos megjelenítésének váltása
Show Original Path Eredeti útvonal megjelenítése
Open this dialog with these settings next time Legközelebb ez a párbeszédablak nyíljon meg ezekkel a beállításokkal
Auto-Simplify Automatikus egyszerűsítés
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -1513,6 +1513,7 @@ digits Malayalam Malayalam
Select a text object to edit its character attributes. Pilih objek teks untuk mengedit atribut karakternya.
Show Options Tampilkan opsi
Show Recent Colors Tampilkan warna terbaru
Toggle RGB Percent Alihkan RGB dalam persen
Small Caps Kapital kecil
Small Caps (on the roadmap) Kapital kecil (masih dalam roadmap)
Standard Vertical Roman Alignment Perataan Romawi vertikal standar
1 # Indonesian (id) catalog. Same format as zh-hant.tsv: context <TAB> source <TAB> translation
1513
1514
1515
1516
1517
1518
1519
+1
View File
@@ -3345,6 +3345,7 @@ digits Malayalam Malayalam
Show Note Mostra nota
Show Options Mostra opzioni
Show Recent Colors Mostra colori recenti
Toggle RGB Percent Alterna RGB in percentuale
Show Original Path Mostra tracciato originale
Open this dialog with these settings next time Apri questa finestra di dialogo con queste impostazioni la prossima volta
Auto-Simplify Semplifica automaticamente
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -3165,6 +3165,7 @@ mark-style Japanese 日本式
Show Note メモを表示
Show Options オプションを表示
Show Recent Colors 最近使用したカラーを表示
Toggle RGB Percent RGB のパーセント表示を切り替え
Show Original Path 元のパスを表示
Open this dialog with these settings next time 次回はこの設定でこのダイアログを開く
Auto-Simplify 自動単純化
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -1451,6 +1451,7 @@ digits Malayalam მალაიალამური
Select a text object to edit its character attributes. სიმბოლოების ატრიბუტების რედაქტირებისთვის მონიშნეთ ტექსტური ობიექტი.
Show Options პარამეტრების ჩვენება
Show Recent Colors ბოლოდროინდელი ფერების ჩვენება
Toggle RGB Percent RGB-ის პროცენტებში ჩვენების გადართვა
Small Caps პატარა მთავრული
Small Caps (on the roadmap) პატარა მთავრული (სამომავლო გეგმაშია)
Standard Vertical Roman Alignment სტანდარტული ვერტიკალური ლათინური სწორება
Can't render this file because it is too large.
+1
View File
@@ -3154,6 +3154,7 @@ mark-style Japanese 일본식
Show Note 메모 표시
Show Options 옵션 표시
Show Recent Colors 최근 색상 표시
Toggle RGB Percent RGB 백분율 표시 전환
Show Original Path 원래 패스 표시
Open this dialog with these settings next time 다음에 이 설정으로 이 대화상자 열기
Auto-Simplify 자동 단순화
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -1527,6 +1527,7 @@ digits Malayalam Malayalam
Select a text object to edit its character attributes. Selecteer een tekstobject om de tekenkenmerken ervan te bewerken.
Show Options Opties tonen
Show Recent Colors Recente kleuren tonen
Toggle RGB Percent RGB in procenten wisselen
Small Caps Kleine kapitalen
Small Caps (on the roadmap) Kleine kapitalen (op de roadmap)
Standard Vertical Roman Alignment Standaard verticale Romeinse uitlijning
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -1518,6 +1518,7 @@ digits Malayalam Malajalam
Select a text object to edit its character attributes. Zaznacz obiekt tekstowy, aby edytować atrybuty znaków.
Show Options Pokaż opcje
Show Recent Colors Pokaż ostatnie kolory
Toggle RGB Percent Przełącz RGB w procentach
Color Panel Options Opcje panelu Kolor
Small Caps Kapitaliki
Small Caps (on the roadmap) Kapitaliki (w planach)
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -2777,6 +2777,7 @@ digits Malayalam Malaiala
Show Note Mostrar Nota
Show Options Mostrar Opções
Show Recent Colors Mostrar Cores Recentes
Toggle RGB Percent Alternar RGB em Porcentagem
Show Original Path Mostrar Caminho Original
Open this dialog with these settings next time Abrir este diálogo com estas configurações na próxima vez
Auto-Simplify Simplificar Automaticamente
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1
View File
@@ -3332,6 +3332,7 @@ digits Malayalam Малаялам
Show Note Показать примечание
Show Options Показать параметры
Show Recent Colors Показать последние цвета
Toggle RGB Percent Переключить RGB в процентах
Show Original Path Показать исходный контур
Open this dialog with these settings next time Открывать это диалоговое окно с этими параметрами в следующий раз
Auto-Simplify Автоматическое упрощение
Can't render this file because it is too large.
+1
View File
@@ -3224,6 +3224,7 @@ digits Malayalam Malayalam
Show Note Visa anteckning
Show Options Visa alternativ
Show Recent Colors Visa senaste färger
Toggle RGB Percent Växla RGB i procent
Show Original Path Visa ursprunglig bana
Open this dialog with these settings next time Öppna den här dialogrutan med de här inställningarna nästa gång
Auto-Simplify Förenkla automatiskt
Can't render this file because it contains an unexpected character in line 5 and column 25.
+1
View File
@@ -3127,6 +3127,7 @@ digits Malayalam Malayalam
Show Note Notu Göster
Show Options Seçenekleri Göster
Show Recent Colors Son Renkleri Göster
Toggle RGB Percent RGB Yüzde Gösterimini Değiştir
Show Original Path Orijinal Yolu Göster
Color Panel Options Renk Paneli Seçenekleri
Show Package Paketi Göster
Can't render this file because it contains an unexpected character in line 5 and column 25.
+1
View File
@@ -3337,6 +3337,7 @@ digits Malayalam Малаялам
Show Note Показати примітку
Show Options Показати параметри
Show Recent Colors Показати останні кольори
Toggle RGB Percent Переключити RGB у відсотках
Show Original Path Показати початковий контур
Open this dialog with these settings next time Наступного разу відкривати це діалогове вікно з цими параметрами
Auto-Simplify Автоматичне спрощення
Can't render this file because it is too large.
+1
View File
@@ -3684,6 +3684,7 @@ mark-style Japanese Kiểu Nhật
Show Note Hiện ghi chú
Show Options Hiện tùy chọn
Show Recent Colors Hiện màu gần đây
Toggle RGB Percent Chuyển đổi RGB theo phần trăm
Show Original Path Hiện đường dẫn gốc
Open this dialog with these settings next time Lần sau mở hộp thoại này với các cài đặt này
Auto-Simplify Tự động đơn giản hóa
Can't render this file because it contains an unexpected character in line 204 and column 5.
+1
View File
@@ -3165,6 +3165,7 @@ digits Malayalam 马拉雅拉姆数字
Show Note 显示注解
Show Options 显示选项
Show Recent Colors 显示最近使用的颜色
Toggle RGB Percent 切换 RGB 百分比显示
Show Original Path 显示原始路径
Open this dialog with these settings next time 下次以这些设置打开此对话框
Auto-Simplify 自动简化
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -4312,6 +4312,7 @@ digits Malayalam 馬來亞拉姆數字
Show Note 顯示註解
Show Options 顯示選項
Show Recent Colors 顯示最近使用的顏色
Toggle RGB Percent 切換 RGB 百分比顯示
Show Original Path 顯示原始路徑
Open this dialog with these settings next time 下次以這些設定開啟此對話方塊
Auto-Simplify 自動簡化
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1
View File
@@ -929,6 +929,7 @@ fn run_ui_part10(app: &mut VectorcraftApp, id: &str, p: &Value) -> Option<Result
"ui.tateChuYokoSettings" => crate::dialogs::tate_chu_yoko::open(app),
"ui.colorGuideLimit" => crate::panels::color_guide::set_limit(app, p),
"ui.colorPanel" => crate::panels::color::command(app, p),
"ui.colorRgbPercent" => crate::panels::color::rgb_percent_command(app, p),
"ui.savePdfDialog" => crate::dialogs::open_save_pdf(app, p),
"file.exportAs" if s("path").is_none() => {
crate::dialogs::open_export_as(app, s("format").as_deref(), p);
+6
View File
@@ -1245,6 +1245,12 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[
"",
"{mode?: grayscale|rgb|hsb|cmyk|websafe, options?: bool, recentColors?: bool, rgbPercent?: bool} pick the Color panel's mode as its panel menu does (the active color converts to the mode's model as one undo step), Show Options (true) or Hide Options (false), check (true) or uncheck (false) Show Recent Colors, which shows or hides the panel's Recent Colors row (applied colors still join the list while it is hidden; the Swatches panel keeps its row), and show the RGB mode's R, G and B in percent (true) or from 0 to 255 (false), as a double-click right of an RGB field switches them (the color does not change; Web Safe RGB and the hex field stay in 0 to 255); all four are kept with the preferences; RGB, HSB, Web Safe RGB and hex values use the working RGB space (ui.inspect: ui.color_mode, ui.color_hide_options, ui.color_show_recent_colors, ui.color_rgb_percent) → {mode (null: none picked yet), options, recentColors, rgbPercent, shown: the mode the panel shows the color in, or tint for a tint of a global or spot swatch}",
),
(
"ui.colorRgbPercent",
"Toggle RGB Percent",
"",
"{} switch the Color panel's R, G and B between percent and 0 to 255, as a double-click right of an RGB field does (ui.colorPanel {rgbPercent}); the color does not change, and the choice is kept with the preferences; a parameter is an error and changes nothing → true when they show in percent",
),
(
"ui.savePdfDialog",
"Save PDF Dialog",
+24 -3
View File
@@ -17,7 +17,8 @@
//! A double-click right of an RGB field switches R, G and B between 0 to 255 and percent (the app
//! keeps it between sessions too); Web Safe RGB and the hex field stay in 0 to 255.
//! `ui.colorPanel` picks a mode, shows or hides the options and checks or unchecks Show Recent
//! Colors as the panel menu does, and switches RGB to percent and back.
//! Colors as the panel menu does, and switches RGB to percent and back. `ui.colorRgbPercent`
//! switches RGB between percent and 0 to 255 from the command palette or a keyboard shortcut.
use egui::{Color32, Rect, Sense, Stroke, StrokeKind, Ui, vec2};
use serde_json::{Value, json};
@@ -584,6 +585,27 @@ pub(crate) fn command(app: &mut VectorcraftApp, p: &Value) -> Result<Value, Stri
}))
}
/// `ui.colorRgbPercent {}`: [`switch_rgb_units`]. A parameter is an error and changes nothing.
pub(crate) fn rgb_percent_command(app: &mut VectorcraftApp, p: &Value) -> Result<Value, String> {
match p {
Value::Null => {}
Value::Object(o) => {
if let Some(key) = o.keys().next() {
return Err(format!("unknown parameter `{key}`; the command takes no parameters"));
}
}
got => return Err(format!("the params must be an object, not {got}")),
}
Ok(json!(switch_rgb_units(app)))
}
/// Switch the RGB mode's R, G and B between percent and 0 to 255, as a double-click right of an
/// RGB field does. → whether they now show in percent.
fn switch_rgb_units(app: &mut VectorcraftApp) -> bool {
app.ui.color_rgb_percent = !app.ui.color_rgb_percent;
app.ui.color_rgb_percent
}
/// Tint mode's rows: the swatch's chip and name, and the T slider and field. Returns a new tint
/// (0..1) and its phase.
fn tint_rows(ui: &mut Ui, tint: &Tint, slider_w: f32, field_w: f32) -> Option<(f32, Live)> {
@@ -783,8 +805,7 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
});
});
if switch_units {
let percent = app.ui.color_rgb_percent;
command(app, &json!({ "rgbPercent": !percent })).ok();
switch_rgb_units(app);
}
ui.add_space(4.0);
// A clicked chip or spectrum colour: the active colour, or with Alt the inactive proxy's.
+31
View File
@@ -849,6 +849,37 @@ fn rgb_percent_comes_back_after_a_restart() {
assert_eq!(app.run("ui.colorPanel", json!({"rgbPercent": false})).unwrap()["rgbPercent"], false);
}
/// Toggle RGB Percent switches the units from the keyboard: the command palette lists it, Keyboard
/// Shortcuts takes a key for it, and each run switches R, G and B between percent and 0 to 255 as
/// the double-click does, without changing the color.
#[test]
fn toggle_rgb_percent_switches_the_units_from_the_keyboard() {
let mut app = app();
let ctx = egui::Context::default();
app.run("paint.setFill", json!({"color": "#336699"})).unwrap();
app.run("ui.colorPanel", json!({"mode": "rgb"})).unwrap();
let listed = crate::palette::items().into_iter().any(|(label, id, _)| id == "ui.colorRgbPercent" && label == "Toggle RGB Percent");
assert!(listed, "the command palette lists it");
let e = crate::shortcut_editor::entry("ui.colorRgbPercent").expect("listed in Keyboard Shortcuts");
assert_eq!(e.label, "Toggle RGB Percent");
assert_eq!(crate::shortcut_editor::default_of("ui.colorRgbPercent"), None, "no default key");
assert_eq!(app.run("ui.colorRgbPercent", json!({})).unwrap(), json!(true));
assert!(app.ui.color_rgb_percent);
frame(&mut app, &ctx, vec![], egui::Modifiers::NONE);
assert_eq!(app.run("ui.colorPanel", json!({})).unwrap()["rgbPercent"], true);
for p in [json!({"rgbPercent": true}), json!({"on": false})] {
let e = app.run("ui.colorRgbPercent", p.clone()).unwrap_err();
assert!(e.ends_with("; the command takes no parameters"), "{p}: {e}");
}
for p in [json!(false), json!([]), json!("on")] {
assert_eq!(app.run("ui.colorRgbPercent", p.clone()).unwrap_err(), format!("the params must be an object, not {p}"));
}
assert!(app.ui.color_rgb_percent, "a parameter changes nothing");
assert_eq!(app.run("ui.colorRgbPercent", json!({})).unwrap(), json!(false));
assert!(!app.ui.color_rgb_percent);
assert_eq!(paints_hex(&app).0, "#336699", "the color does not change");
}
/// `ui.colorPanel {mode}` picks a mode as the panel menu does: HSB shows an RGB fill as H, S and
/// B, and CMYK converts it as one undo step.
#[test]
+3 -1
View File
@@ -251,7 +251,9 @@ shown}`: `mode` is null until a mode is picked, and `shown` is the mode the pane
tint of a global or spot swatch. Another mode, `lab` included, answers an error, as does an `options`, `recentColors`
or `rgbPercent` value that is not true or false. The desktop app keeps the four settings with its preferences, and
`ui.inspect` reports them as `ui.color_mode`, `ui.color_hide_options`, `ui.color_show_recent_colors` and
`ui.color_rgb_percent`.
`ui.color_rgb_percent`. `ui.colorRgbPercent {}` (Toggle RGB Percent in the command palette and Keyboard Shortcuts)
switches R, G and B between percent and 0 to 255 and answers true when they show in percent; a parameter answers an
error and changes nothing.
Color Themes panel (`window.panel {panel: "colorThemes"}`): its Create tab makes a theme on a harmony wheel and its
My Themes tab lists the saved themes; every action runs a command (`colorTheme.save`, `colorTheme.delete`,
+2
View File
@@ -591,6 +591,8 @@ opens the picker through `run_command` with the remote backend. `ui.colorPanel {
the panel menu's Show Recent Colors, which hides the Color panel's Recent Colors row, and `true` shows it again;
applied colors still join the list while it is hidden. `ui.colorPanel {"rgbPercent": true}` shows the Color panel's
RGB fields in percent, as a double-click right of an RGB field does, and `false` shows them from 0 to 255 again.
`ui.colorRgbPercent` (Toggle RGB Percent in the command palette and Keyboard Shortcuts) switches between the two
and answers true when the fields show in percent.
In remote desktop mode, `invoke_menu` with `{"command":"ui.sampleScreenColor","params":{}}` shows the system's
screen color sampler and returns `null` before a color is picked: the system's sampler on macOS, the XDG desktop
+1 -1
View File
@@ -1353,7 +1353,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
Unchecking Show Recent Colors in the Color panel's menu hides its Recent Colors row, and checking it shows the row again ([Select colors using the Color panel](https://helpx.adobe.com/illustrator/desktop/manage-colors/select-and-adjust-colors/select-colors-using-the-color-panel.html)). In VectorCraft the item is checked by default and kept between sessions, applied colors still join the list while the row is hidden, Hide Options hides the row either way, and the Swatches panel keeps its row (`ui.colorPanel {recentColors}`). Tests: `show_recent_colors_hides_and_shows_the_row` in `crates/ui-egui/src/panels/color/tests.rs`.
A Recent Colors chip in the Color or Swatches panel drags into the Swatches panel's list to become a swatch of its color, in its color model, as one undo step ([Select colors using the Color panel](https://helpx.adobe.com/illustrator/desktop/manage-colors/select-and-adjust-colors/select-colors-using-the-color-panel.html)). In VectorCraft a chip dropped on a color group or one of its swatches joins that group, anywhere else in the list it joins the ungrouped swatches at the end, a color that is already a swatch is added again under another name, and dragging a chip does not paint the selected art (`swatch.new`). Tests: `a_recent_color_dragged_onto_the_list_becomes_a_swatch` and `a_recent_color_dragged_from_the_color_panel_becomes_a_swatch` in `crates/ui-egui/src/panels/swatches/tests.rs`.
A Cmd/Ctrl-click on the Color panel's spectrum applies Complement and a Cmd/Ctrl+Shift-click applies Invert to the active Fill or Stroke (`paint.complement`, `paint.invert`); with Alt also held, the click recolors the inactive one, as the reference app's [Default keyboard shortcuts](https://web.archive.org/web/20260726060015/https://helpx.adobe.com/illustrator/using/default-keyboard-shortcuts.html) list them.
A double-click right of an RGB field switches the Color panel's R, G and B between percent and 0 to 255 ([Default keyboard shortcuts](https://helpx.adobe.com/illustrator/using/default-keyboard-shortcuts.html), Color panel). In VectorCraft the color does not change, Web Safe RGB and the hex field stay in 0 to 255, and the panel keeps the choice between sessions (`ui.colorPanel {rgbPercent}`); the color mixer of the Fill and Stroke chips and the gradient stop dialog follow the same setting. Tests: `rgb_percent_switches_the_rgb_fields_between_percent_and_0_to_255`, `rgb_percent_does_not_switch_while_the_rows_are_disabled` and `rgb_percent_comes_back_after_a_restart` in `crates/ui-egui/src/panels/color/tests.rs`.
A double-click right of an RGB field switches the Color panel's R, G and B between percent and 0 to 255 ([Default keyboard shortcuts](https://helpx.adobe.com/illustrator/using/default-keyboard-shortcuts.html), Color panel). In VectorCraft the color does not change, Web Safe RGB and the hex field stay in 0 to 255, and the panel keeps the choice between sessions (`ui.colorPanel {rgbPercent}`); the color mixer of the Fill and Stroke chips and the gradient stop dialog follow the same setting. Toggle RGB Percent (`ui.colorRgbPercent`) in the command palette and Keyboard Shortcuts switches the units from the keyboard. Tests: `rgb_percent_switches_the_rgb_fields_between_percent_and_0_to_255`, `rgb_percent_does_not_switch_while_the_rows_are_disabled`, `rgb_percent_comes_back_after_a_restart` and `toggle_rgb_percent_switches_the_units_from_the_keyboard` in `crates/ui-egui/src/panels/color/tests.rs`.
View › Proof Setup › Color blindness – Tritanopia-type turns Proof Colors on and proofs the canvas with the tritanopia simulation of Brettel, Viénot and Mollon (1997). The Separations Preview panel's Proof Setup list offers the same target (`view.proofSetup {target: "tritanopia"}`). Grays keep their value.
The Separations Preview panel's Gamut Check button reports one color outside the CMYK gamut in the singular and more in the plural, in English and in each language's plural forms (`gamut_check_status_takes_the_plural_form` in `crates/ui-egui/src/i18n/tests.rs`).
- **Document Color Mode outside the layers:** File › Document Color Mode (in one undo step) and `document.open {colorMode}` also convert the colors of graph designs, graphic styles, opacity-mask art, the tile that pattern editing's Cancel puts back and the art of brushes (with a Hue Shift brush's key color); a tint of a global swatch there becomes the converted swatch's color at its tint, as in the art.