g3-toolkit API Reference
    Preparing search index...

    Function contrastRatio

    • WCAG contrast ratio between two hex colors (1..21); null if either color is not plain hex (e.g. rgba() strings are skipped, not failed).

      Parameters

      • a: string
      • b: string

      Returns number | null