CIA Compliance Manager API Documentation - v1.1.6
    Preparing search index...

    Variable meetsContrastRequirement

    meetsContrastRequirement: (
        foreground: string,
        background: string,
        isLargeText?: boolean,
    ) => boolean

    Type Declaration

      • (foreground: string, background: string, isLargeText?: boolean): boolean
      • Check if element has sufficient color contrast Note: This is a simplified check. Use dedicated tools for comprehensive testing.

        Parameters

        • foreground: string

          Foreground color (hex)

        • background: string

          Background color (hex)

        • isLargeText: boolean = false

          Whether text is large (18pt+ or 14pt+ bold)

        Returns boolean

        Whether contrast meets WCAG AA standards

        Error if colors are invalid hex values