Skip to main content

Module theme

Module theme 

Source
Expand description

Compatibility facade for shared theme APIs.

Structs§

ColorAccessibilityConfig
Color accessibility configuration loaded from vtcode.toml.
ThemeDefinition
ThemePalette
Palette describing UI colors for the terminal experience.
ThemeStyles
Styles computed from palette colors.
ThemeSuite
Logical grouping of built-in themes.
ThemeValidationResult
Theme validation result.

Constants§

DEFAULT_THEME_ID
Identifier for the default theme.

Functions§

active_styles
Return a clone of the active style set.
active_theme_id
Return the active theme identifier.
active_theme_label
Return the active theme label.
available_theme_suites
Return the built-in theme suites and their member theme identifiers.
available_themes
Return the list of built-in theme identifiers in sorted order.
banner_color
Return a readable accent color for banner-like copy.
banner_style
Return a bold banner style derived from the active theme.
ensure_theme
Validate that a theme exists and return its label.
get_active_syntax_theme
get_minimum_contrast
Return the currently configured minimum contrast ratio.
get_syntax_theme_for_ui_theme
Get the recommended syntax highlighting theme for a given UI theme.
is_bold_bright_mode
Report whether bold text should avoid terminal bright-color behavior.
is_light_theme
Report whether a built-in theme should be treated as a light theme.
is_safe_colors_only
Report whether the UI should restrict itself to safe ANSI colors.
logo_accent_color
Return the raw logo accent color from the active theme.
rebuild_active_styles
Rebuild the active styles after accessibility settings change.
resolve_theme
Resolve a requested theme to a valid built-in identifier or the default.
set_active_theme
Activate a built-in theme by identifier.
set_color_accessibility_config
Update the runtime color accessibility configuration.
suggest_theme_for_terminal
Suggest a built-in theme that matches the current terminal scheme.
theme_label
Return the display label for a built-in theme.
theme_matches_terminal_scheme
Report whether a theme matches the detected terminal light/dark scheme.
theme_suite_id
Return the logical theme suite identifier for a built-in theme.
theme_suite_label
Return the logical theme suite label for a built-in theme.
validate_theme_contrast
Validate a theme’s base palette contrast ratios.