mwg API
    Preparing search index...

    Function meetsContrast

    • Whether foreground on background reaches the WCAG minimum for level: 4.5 (AA) or 7 (AAA), relaxed to 3 / 4.5 for large text (roughly 18pt, or 14pt bold).

      Parameters

      • foreground: number
      • background: number
      • level: ContrastLevel = 'AA'
      • large: boolean = false

      Returns boolean