Skip to content

charton API


charton API / @chart-on/core / index / resolveThemeColor

Function: resolveThemeColor() ​

resolveThemeColor(color, theme): string | undefined

Defined in: packages/core/src/theme.ts:313

The color color stands for: the theme's value when it names a theme color ('levelGreen', 'up'), else color itself. undefined when it is unset or names a theme color the theme leaves unset, so callers fall back with ??.

Parameters ​

color ​

string | undefined

theme ​

ChartTheme

Returns ​

string | undefined