Theme
Comprehensive theme configuration for the elements UI system.
Defines all visual properties including colors, fonts, spacing, and alpha values for various UI components. Themes can be customized per-context or per-component.
Features:
- Serializable properties for persistence
- Color tinting for theme variations
- Cloning for creating theme variants
- Support for custom fonts
The theme uses a consistent naming scheme:
light*
: Brightest variantsmedium*
: Mid-tone variantsdark*
: Darker variantsdarker*
: Darkest variants
Instance Members
Whether to show background colors in form layouts
Color for text in input fields
Color for placeholder text in empty fields
Light text color for primary content
Medium text color for secondary content
Dark text color for tertiary content
Darker text color for least prominent content
Default color for icons and glyphs
Custom medium weight font override
Medium weight font (uses custom or falls back to default)
Custom bold font override
Bold font (uses custom or falls back to default)
Creates a deep copy of this theme.
Name | Type | Default | Description |
---|---|---|---|
toTheme |
Theme | (optional) | Optional theme instance to copy into (creates new if null) |
Returns | Description |
---|---|
Theme | The cloned theme |
Apply the given tint
color using baseTheme
as lightness references.
Recolors most theme elements while preserving relative brightness relationships. Selection and highlight colors are not affected (use applyAltTint for those).
Name | Type | Default | Description |
---|---|---|---|
baseTheme |
Theme | (optional) | Base theme to derive lightness values from (defaults to context theme) |
tint |
ceramic.Color | Color to tint the theme with (uses HSLuv color space) |
Apply the given alt tint
color using baseTheme
as lightness references.
Specifically tints selection, highlight, and focus colors. Use this for accent color customization.
Name | Type | Default | Description |
---|---|---|---|
baseTheme |
Theme | (optional) | Base theme to derive lightness values from (defaults to context theme) |
tint |
ceramic.Color | Accent color to apply (uses HSLuv color space) |
Sets the background color for tabs and windows.
Name | Type | Description |
---|---|---|
color |
ceramic.Color | The background color to apply |
Sets all text color variants to the same color. Useful for high contrast or monochrome themes.
Name | Type | Description |
---|---|---|
color |
ceramic.Color | The text color to apply to all variants |
Creates a new Theme with default dark color scheme.
Private Members
Event when backgroundInFormLayout field changes.
Name | Type |
---|---|
current |
Bool |
previous |
Bool |
Event when fieldTextColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when fieldPlaceholderColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when lightTextColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when mediumTextColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when darkTextColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when darkerTextColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when iconColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when customMediumFont field changes.
Name | Type |
---|---|
current |
ceramic.BitmapFont |
previous |
ceramic.BitmapFont |
Event when customBoldFont field changes.
Name | Type |
---|---|
current |
ceramic.BitmapFont |
previous |
ceramic.BitmapFont |
Event when lighterBorderColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when lightBorderColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when mediumBorderColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when darkBorderColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when lightBackgroundColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when mediumBackgroundColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when darkBackgroundColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when darkerBackgroundColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when selectionBorderColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when highlightColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when highlightPendingColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when formItemSpacing field changes.
Name | Type |
---|---|
current |
Float |
previous |
Float |
Event when formPadding field changes.
Name | Type |
---|---|
current |
Float |
previous |
Float |
Event when tabsMarginY field changes.
Name | Type |
---|---|
current |
Float |
previous |
Float |
Event when focusedFieldSelectionColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when focusedFieldBorderColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when overlayBackgroundColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when overlayBackgroundAlpha field changes.
Name | Type |
---|---|
current |
Float |
previous |
Float |
Event when overlayBorderColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when overlayBorderAlpha field changes.
Name | Type |
---|---|
current |
Float |
previous |
Float |
Event when buttonBackgroundColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when buttonOverBackgroundColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
emitButtonPressedBackgroundColorChange(current: ceramic.Color, previous: ceramic.Color): Void
Event when buttonPressedBackgroundColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when buttonFocusedBorderColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when tabsBackgroundColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when tabsBackgroundAlpha field changes.
Name | Type |
---|---|
current |
Float |
previous |
Float |
Event when tabsHoverBackgroundColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when tabsHoverBackgroundAlpha field changes.
Name | Type |
---|---|
current |
Float |
previous |
Float |
Event when tabsBorderColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when disabledTabTextAlpha field changes.
Name | Type |
---|---|
current |
Float |
previous |
Float |
Event when disabledTabBorderAlpha field changes.
Name | Type |
---|---|
current |
Float |
previous |
Float |
Event when windowBackgroundColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when windowBackgroundAlpha field changes.
Name | Type |
---|---|
current |
Float |
previous |
Float |
Event when windowBorderColor field changes.
Name | Type |
---|---|
current |
ceramic.Color |
previous |
ceramic.Color |
Event when windowBorderAlpha field changes.
Name | Type |
---|---|
current |
Float |
previous |
Float |
Metadata
Name | Parameters |
---|---|
:build |
tracker.macros.EventsMacro.build() |
:autoBuild |
tracker.macros.EventsMacro.build() |
:build |
ceramic.macros.EntityMacro.buildForCompletion() |
:autoBuild |
ceramic.macros.EntityMacro.buildForCompletion() |
:build |
tracker.macros.ObservableMacro.build() |
:autoBuild |
tracker.macros.ObservableMacro.build() |
:build |
tracker.macros.SerializableMacro.build() |
:autoBuild |
tracker.macros.SerializableMacro.build() |