Skip to main content

Function: getWCAGCompliance()

getWCAGCompliance(color1, color2, size): object

Determines the WCAG compliance level for the contrast between two colors.

Parameters

ParameterTypeDescription
color1ColorThe first color.
color2ColorThe second color.
sizeTextSizeThe size of the text ('Normal' or 'Large').

Returns

object

An object containing the compliance level and the contrast ratio.

NameTypeDefined in
contrastRationumberaccessability/components/wcag-compliance.ts:17
levelWCAGComplianceLevelaccessability/components/wcag-compliance.ts:17

Defined in

accessability/components/wcag-compliance.ts:13