Skip to main content

getThemeColor

FitFileViewer - API Documentation v29.4.0


FitFileViewer - API Documentation / utils/charts/theming/getThemeColors / getThemeColor

Function: getThemeColor()

getThemeColor(colorKey: string, fallback?: string): string

Defined in: utils/charts/theming/getThemeColors.js:28

Gets a specific theme color by key with fallback

Parameters​

colorKey​

string

The color key to retrieve

fallback?​

string = "#000000"

Fallback color if key not found

Returns​

string

The color value or fallback

Example​

// Get specific color with fallback
const bgColor = getThemeColor("bgPrimary", "#ffffff");