/** * Type definition for the useAccessibleColor hook * @param hex - The hex color to generate accessible colors for * @param mode - The color mode (light or dark) * @returns Object containing accessible foreground, background, and border colors */ export type UseAccessibleColorType = (hex?: string, mode?: "light" | "dark") => { foreground?: string; background?: string; border?: string; }; /** * Custom hook for generating accessible color combinations that meet WCAG contrast requirements. * * Features: * - Generates accessible foreground, background, and border colors * - Supports both light and dark color modes * - Ensures WCAG contrast ratio compliance (4.5:1 for text, 3:1 for borders) * - Automatically adjusts colors to meet accessibility standards * - Handles invalid color inputs gracefully * - Uses tinycolor2 for color manipulation and contrast calculations * - Optimized with useMemo for performance * - Implements intelligent color selection algorithms * - Provides fallback strategies for edge cases * - Supports dynamic theme switching * * Algorithm Details: * - Light Mode: Selects white or dark text based on background contrast * - Dark Mode: Adjusts both foreground and background for optimal contrast * - Border Generation: Ensures 3:1 contrast ratio with page background * - Iterative Adjustment: Uses up to 16 iterations for color optimization * - Luminance Thresholds: Maintains appropriate darkness levels for dark themes * * @param hex - The hex color to generate accessible colors for (e.g., "#FF0000") * @param mode - The color mode ("light" or "dark") for context-aware color generation * @returns Object containing accessible foreground, background, and border colors in hex format */ export declare const useAccessibleColor: UseAccessibleColorType;