feat(ui): show RGB for unnamed palette colours instead of "Index"

Picking a colour from the full palette showed a generic "Index" label.
Add color_display_name: standard names for ACI 1-9 / ByLayer / ByBlock,
"R,G,B" (0-255) for every other indexed or true colour. Used by the shared
colour selector button and the ribbon colour combo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-06-14 14:27:35 +03:00
commit b7c5103891
2 changed files with 28 additions and 3 deletions

View file

@ -858,8 +858,12 @@ pub(super) fn render_large<'a>(
.width(Length::Fixed(PROP_W))
};
let (color_swatch, color_label) = acad_color_display(active_color);
let color_row = prop_row(color_label.to_string(), PROP_COLOR_ID, Some(color_swatch));
let (color_swatch, _) = acad_color_display(active_color);
let color_row = prop_row(
crate::ui::color_select::color_display_name(active_color),
PROP_COLOR_ID,
Some(color_swatch),
);
let lt_row = prop_row(active_linetype.to_string(), PROP_LINETYPE_ID, None);
let lw_row = prop_row(LwItem(active_lineweight).to_string(), PROP_LW_ID, None);