export type RGB = readonly [red: number, green: number, blue: number];
/**
 * Converts a hex string into an rgb value. This is useful for detecting color
 * contrast ratios and other stuff.
 *
 * @param hex - The hex string to convert
 * @returns an object containing the r, g, b values for the color.
 */
export declare function hexToRGB(hex: string): RGB;
export declare function getRGB(color: string): RGB;
/**
 * A number closest to 0 should be closest to black while a number closest to 1
 * should be closest to white.
 *
 * @see https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
 * @internal
 */
export declare function getLuminance(color: string): number;
/**
 * Gets the contrast ratio between a background color and a foreground color.
 *
 * @see https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
 *
 * @param background - The background color
 * @param foreground - The foreground color. This is normally the `color` css
 * value.
 * @returns the contrast ratio between the background and foreground colors.
 */
export declare function getContrastRatio(background: string, foreground: string): number;
/**
 * The type of contrast ratio compliance to confirm to. The ratios in order are:
 * - 3:1 for large text (18pt normal or 14pt bold)
 * - 4.5:1 for normal text
 * - 7:1 for Level AAA requirements.
 *
 * @see https://www.w3.org/TR/WCAG20/#visual-audio-contrast
 * @see https://www.w3.org/TR/WCAG20/#larger-scaledef
 */
export type ContrastRatioCompliance = "large" | "normal" | "AAA";
/**
 * The contrast ratio that can be used for large text where large text is
 * considered 18pt or 14pt bold.
 */
export declare const LARGE_TEXT_CONTRAST_RATIO = 3;
/**
 * The contrast ratio that can be used for normal text.
 */
export declare const NORMAL_TEXT_CONTRAST_RATIO = 4.5;
/**
 * The AAA contrast ratio for passing WGAC 2.0 color contrast ratios.
 */
export declare const AAA_CONTRAST_RATIO = 7;
/**
 * Checks if there is an acceptable contrast ratio between the background and
 * foreground colors based on the provided compliance level.
 *
 * @param background - The background color to check against
 * @param foreground - The foreground color to check against
 * @param compliance - The compliance level to use or a custom number as a
 * ratio.
 * @returns true if there is enough contrast between the foreground and
 * background colors for the provided compliance level.
 */
export declare function isContrastCompliant(background: string, foreground: string, compliance?: ContrastRatioCompliance | number): boolean;
/**
 * Returns the highest contrast color to the provided `backgroundColor`. This is
 * normally used to ensure that a new background color can use an accessible text
 * color of either `#000` or `#fff`.
 *
 * This is pretty much a javascript implementation as the `contrast-color` Sass
 * function.
 *
 * @remarks \@since 6.0.0
 */
export declare function contrastColor(backgroundColor: string, lightColor?: string, darkColor?: string): string;
