Class ColorContrastAssessor

Evaluates if two colors meet the AA or AAA contrast standard of the Web Content Accessibility Guidelines (WCAG).
To learn more about WCAG, visit https://www.w3.org/WAI/standards-guidelines/wcag/.

Constructors

Methods

  • Do the given colors conform to guidelines for the given standard and font size?

    Parameters

    Returns boolean

    true if the two colors have an acceptable contrast ratio for the given ContrastStandard and ContrastFontSize, false if they do not have an acceptable ratio.