Trevixal API
Preparing search index...
@trevixal/extension-writing
contrastRatio
Function contrastRatio
contrastRatio
(
foreground
:
string
,
background
:
string
)
:
number
|
null
The WCAG contrast ratio of two colours, 1 to 21; null when either cannot be read.
Parameters
foreground
:
string
background
:
string
Returns
number
|
null
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Trevixal API
Loading...
The WCAG contrast ratio of two colours, 1 to 21; null when either cannot be read.