ui/client/features/shell/domain/Contrast
Pure (DOMAIN-001): WCAG 2.x relative-luminance contrast, used to guard the design tokens.
Cockpit client (features), next. Source: ui/client/features/shell/domain/Contrast.ts.
Type Aliases#
Rgb#
Rgb = [
number,number,number]
Defined in: ui/client/features/shell/domain/Contrast.ts:4
Functions#
contrastRatio()#
contrastRatio(
a,b):number
Defined in: ui/client/features/shell/domain/Contrast.ts:31
Parameters#
a
b
Returns#
number
parseColor()#
parseColor(
value,over?):Rgb
Defined in: ui/client/features/shell/domain/Contrast.ts:7
Parses #rgb, #rrggbb and rgba(r,g,b,a) (composited over over, default black).
Parameters#
value
string
over?
Rgb = ...