Theme Types
Theme
The core theme type that defines the structure of a complete theme.Display name of the theme (e.g., “Light”, “Dark”)
Collection of all color values in the theme
SavedTheme
Represents a user-saved theme with metadata.Unique identifier for the saved theme (e.g., “saved-1234567890”)
User-provided name for the saved theme
The complete theme object
Base theme name (“light” or “dark”)
ISO 8601 timestamp when the theme was saved
ThemeContextType
The type definition for the Theme Context API.Current active theme
Current theme name (“light” or “dark”)
Set the theme by name with optional custom colorsParameters:
themeName(string): Theme to activatecustomColors(Partial<Theme[“colors”]>): Optional color overrides
Update a specific theme property by pathParameters:
path(string[]): Property path (e.g., [“colors”, “primary”])value(string): New value to set
Undo the last theme change
Redo the last undone change
Whether undo is available
Whether redo is available
Manually push current state to history
Array of user-saved themes
Save the current themeParameters:
name(string): Name for the saved theme
Delete a saved theme by IDParameters:
id(string): ID of theme to delete
Load a saved themeParameters:
saved(SavedTheme): Theme to load
Color Types
RGB
Red, Green, Blue color representation.Red channel (0-255)
Green channel (0-255)
Blue channel (0-255)
HSL
Hue, Saturation, Lightness color representation.Hue (0-360 degrees)
Saturation (0-100%)
Lightness (0-100%)
HSV
Hue, Saturation, Value color representation.Hue (0-360 degrees)
Saturation (0-100%)
Value/Brightness (0-100%)
WCAGContrastResult
WCAG contrast ratio analysis result.Calculated contrast ratio (e.g., 4.5)
Passes WCAG AA for normal text (4.5:1)
Passes WCAG AA for large text (3:1)
Passes WCAG AAA for normal text (7:1)
Passes WCAG AAA for large text (4.5:1)
HarmonyMode
Color harmony generation mode.Generate colors 180 degrees apart on the color wheel
Generate colors using the same hue with different lightness
Component Types
ColorPickerVariant
Defines the variant of the color picker component.Limited to predefined color options
Full color picker with format selection
ColorFormat
Color format options for display and export.OKLCH perceptually uniform color space
Hexadecimal color format (#RRGGBB)
RGB color format (rgb(r, g, b))
HSL color format (hsl(h, s%, l%))
ColorPickerProps
Props for the ColorPicker component.Current color value (hex format)
Callback when color changesParameters:
color(string): New color value
Initial color format to display (default: OKLCH)
Picker variant (predefined or free)
ColorPickerPopoverProps
Props for the ColorPickerPopover component.Whether the popover is visible
Currently selected color
Currently selected color property name
Array of color button configurations
Contrast ratios keyed by property name
Left position for the popover (in pixels)
Callback when color changesParameters:
color(string): New color value
ColorButtonData
Configuration for a color button in the theme customizer.Current color value
Display label for the button
Theme property name this button controls
Foreground color property for contrast check
Background color property for contrast check
Target contrast ratio (e.g., 4.5, 7)
Optional text color to display on the button
ColorButtonProps
Props for the ColorButton component.Current color value
Display label
Theme property name
Click handlerParameters:
color(string): Current colorproperty(string): Property namebutton(HTMLButtonElement): Button element reference
Whether this color is locked from changes
Lock toggle handlerParameters:
property(string): Property name to toggle
Current contrast ratio
Target contrast ratio
Whether dark theme is active
Whether to use compact layout
Optional text color override
State Management Types
ColorPickerState
State for the color picker popover.Whether picker is open
Currently selected color
Currently selected property
Reference to the active button element
Popover left position
ColorPickerAction
Actions for color picker state reducer.ExportModalState
State for the export modal.Whether modal is visible
Selected export format
Tailwind CSS version for export
Which theme mode(s) to export
Color format for export
Whether code was copied to clipboard
Whether modal is in closing animation
Whether modal is in entering animation
ExportModalAction
Actions for export modal state reducer.Export Types
ExportModalProps
Props for the ExportModal component.Whether the modal is open
Callback to close the modal
Related Documentation
Color Utilities
Functions for color manipulation and conversion
Theme Context
React context for theme management
Components
UI component API reference