Member Junction
    Preparing search index...

    One evaluated contrast pair.

    interface ContrastCheck {
        bg: string;
        fg: string;
        name: string;
        passes: boolean;
        ratio: number;
        required: number;
        suggestion?: { adjust: "fg" | "bg"; hex: string } | null;
    }
    Index

    Properties

    bg: string

    Background hex.

    fg: string

    Foreground hex.

    name: string

    Human-readable pair name, e.g. "text-on-primary (hover)".

    passes: boolean
    ratio: number

    Achieved ratio (1..21).

    required: number

    Required ratio for this pair.

    suggestion?: { adjust: "fg" | "bg"; hex: string } | null

    When failing, a suggested replacement for clampTarget ('bg' or 'fg') that reaches required by shifting lightness, or null if unreachable in gamut.