/** * Colour nudging detection — EDPB Guidelines 03/2022 § 3.3.3. * * A "positive" colour (green = go, approve) on the accept button combined with * a "negative" or neutral colour (grey, red) on the reject button steers users * toward consent without technically hiding the refusal option. */ /** Returns [hue 0–360, saturation 0–100, lightness 0–100]. */ export declare function rgbToHsl(r: number, g: number, b: number): [number, number, number]; export type ButtonHue = "green" | "red" | "grey" | "blue" | "neutral"; /** * Classify the perceptual "valence" of a colour: * - green → positive, approval (h 80–165, s ≥ 25) * - red → negative, danger (h ≤ 20 or ≥ 340, s ≥ 25) * - grey → neutral / muted (s < 20) * - blue → informational (h 195–265, s ≥ 25) * - neutral → anything else * * Very dark (<10 L) or very light (>93 L) colours are treated as neutral * because their hue carries little visual weight in a button context. */ export declare function classifyHue(r: number, g: number, b: number): ButtonHue; export interface ColourNudgingResult { acceptHue: ButtonHue | null; rejectHue: ButtonHue | null; /** True when accept is green and reject is grey or red. */ isNudging: boolean; } /** * Detect colour nudging between the accept and reject buttons. * * Returns `isNudging: true` when the accept button has a "positive" hue (green) * while the reject button has a "negative" or neutral hue (grey or red). */ export declare function detectColourNudging(acceptBg: string | null | undefined, rejectBg: string | null | undefined): ColourNudgingResult; //# sourceMappingURL=colour.d.ts.map