Function: getWCAGCompliance()
getWCAGCompliance(
color1,color2,size):object
Determines the WCAG compliance level for the contrast between two colors.
Parameters
| Parameter | Type | Description |
|---|---|---|
color1 | Color | The first color. |
color2 | Color | The second color. |
size | TextSize | The size of the text ('Normal' or 'Large'). |
Returns
object
An object containing the compliance level and the contrast ratio.
| Name | Type | Defined in |
|---|---|---|
contrastRatio | number | accessability/components/wcag-compliance.ts:17 |
level | WCAGComplianceLevel | accessability/components/wcag-compliance.ts:17 |
Defined in
accessability/components/wcag-compliance.ts:13