Raxol.UI.Theming.Theme (Raxol v2.0.1)
View SourceTheme management for Raxol UI components.
This module provides functionality for:
- Theme definition and management
- Color palette integration
- Component styling
- Theme variants and accessibility
Summary
Functions
Returns a high-contrast version of the given theme, for accessibility support. If the theme is already high-contrast, returns it unchanged.
Applies a theme by name or struct.
Creates a high contrast variant of the theme.
Returns the current theme.
Returns the dark theme.
Returns the default theme.
Gets a theme by ID.
Gets a value from the theme using a path.
Gets a color from the theme, respecting variants and accessibility settings.
Gets a component style from the theme.
Creates a child theme that inherits from a parent theme.
Initializes the theme system and registers the default theme. This should be called during application startup.
Lists all available themes.
Merges two themes, with the second theme overriding values from the first.
Creates a new theme with the given attributes.
Registers a theme in the application environment.
Types
@type color_value() :: Raxol.Style.Colors.Color.t() | atom() | String.t()
@type t() :: %Raxol.UI.Theming.Theme{ colors: map() | nil, component_styles: map() | nil, dark_mode: boolean() | nil, description: String.t() | nil, fonts: map() | nil, high_contrast: term(), id: String.t() | nil, metadata: map() | nil, name: String.t() | nil, styles: map() | nil, ui_mappings: map() | nil, variants: map() | nil }
Functions
Returns a high-contrast version of the given theme, for accessibility support. If the theme is already high-contrast, returns it unchanged.
Applies a theme by name or struct.
Creates a high contrast variant of the theme.
Returns the current theme.
Returns the dark theme.
Returns the default theme.
Gets a theme by ID.
Gets a value from the theme using a path.
Gets a color from the theme, respecting variants and accessibility settings.
Gets a component style from the theme.
Creates a child theme that inherits from a parent theme.
Initializes the theme system and registers the default theme. This should be called during application startup.
Lists all available themes.
Merges two themes, with the second theme overriding values from the first.
Creates a new theme with the given attributes.
Registers a theme in the application environment.