Skip to content

Documentation / @ripl/charts / resolveTheme

Function: resolveTheme() ​

resolveTheme(theme?): Theme

Defined in: charts/src/core/theme.ts:141

Resolves a theme input into a concrete Theme.

A Theme object is returned as-is; a registered name is looked up; 'auto' follows the OS prefers-color-scheme; and an unknown name or undefined falls back to the current getDefaultTheme.

Parameters ​

ParameterTypeDescription
theme?string | ThemeA theme name, 'auto', a Theme, or undefined.

Returns ​

Theme

The resolved theme.