Skip to content

Function: getNormalizedForegroundColor()

ts
function getNormalizedForegroundColor(
   bgColor: string,
   themeColors:
  | {
[key: string]: string | undefined;
  background?: string;
  error?: string;
  info?: string;
  on-background?: string;
  on-error?: string;
  on-info?: string;
  on-primary?: string;
  on-secondary?: string;
  on-success?: string;
  on-surface?: string;
  on-warning?: string;
  primary?: string;
  secondary?: string;
  success?: string;
  surface?: string;
  warning?: string;
}
  | undefined,
   fallback: RGB,
   modifiers?: ColorModifier): RGB;

Parameters

ParameterType
bgColorstring
themeColors| { [key: string]: string | undefined; background?: string; error?: string; info?: string; on-background?: string; on-error?: string; on-info?: string; on-primary?: string; on-secondary?: string; on-success?: string; on-surface?: string; on-warning?: string; primary?: string; secondary?: string; success?: string; surface?: string; warning?: string; } | undefined
fallbackRGB
modifiers?ColorModifier

Returns

RGB