colors¶
Color utilities and background constants for VisFEM.
css_rgb
¶
Return the CSS rgb() string for unit-range tuple rgb, each channel rounded to 0 to 255.
scheme_to_hex
¶
Return the colors of PyVista color scheme scheme_id as '#rrggbb' strings.
is_valid_hex
¶
Return True when color is a '#rrggbb' string a VTK lookup table accepts.
category_key
¶
Return the override key for item: its first display name (region label, organ filename or part label).
apply_color_overrides
¶
Apply overrides to legend_items; return the recolored items and their LUT colors in item order.
active_overrides
¶
Return a dict of category -> hex overrides for the current scope.
set_override
¶
Set the override for category name to color in the current scope; None clears it.
apply_overrides_to_state
¶
Write legend_items to state with overrides applied; return the LUT colors.