@dragonspark/chroma-kit
    Preparing search index...

    Function checkWCAG21Contrast

    • Checks if the contrast between two colors meets WCAG 2.1 requirements for a specific content type

      Parameters

      • foreground: string | Color

        The foreground color (text color)

      • background: string | Color

        The background color

      • content: WCAG21ContentType

        The type of content being checked

      Returns boolean

      True if the contrast meets the minimum requirement for the content type, false otherwise