UNPKG

@buddhacognitivelab/theme-glassmorphic

Version:

Enhanced glassmorphic theme package with dual-mode support, advanced glass effects, interactive UI components, and gesture-based interactions

109 lines (108 loc) 3.9 kB
/** * Enhanced Color Utilities for Glassmorphic Theme * Provides color manipulation, accessibility, and semantic color functions */ import { ColorUtils, ColorAccessibility, EnhancedColorScale } from '../types/theme'; /** * Convert hex color to RGB values */ export declare function hexToRgb(hex: string): { r: number; g: number; b: number; } | null; /** * Convert RGB values to hex color */ export declare function rgbToHex(r: number, g: number, b: number): string; /** * Convert hex color to HSL values */ export declare function hexToHsl(hex: string): { h: number; s: number; l: number; } | null; /** * Convert HSL values to hex color */ export declare function hslToHex(h: number, s: number, l: number): string; /** * Calculate relative luminance of a color */ export declare function getLuminance(hex: string): number; /** * Color manipulation utilities implementation */ export declare const colorUtils: ColorUtils; /** * Color accessibility utilities implementation */ export declare const colorAccessibility: ColorAccessibility; /** * Generate enhanced color scale from a base color */ export declare function generateEnhancedColorScale(baseColor: string): EnhancedColorScale; /** * Create semantic color mapping */ export declare function createSemanticColors(palette: any): { brand: { primary: any; secondary: any; tertiary: any; }; feedback: { success: any; warning: any; error: any; info: any; }; neutral: { white: string; gray: { 50: string; 100: string; 200: string; 300: string; 400: string; 500: string; 600: string; 700: string; 800: string; 900: string; }; black: string; }; interactive: { default: any; hover: any; active: any; focus: any; disabled: any; }; }; export declare const getContrastRatio: (foreground: string, background: string) => number; export declare const lightenColor: (color: string, amount: number) => string; export declare const darkenColor: (color: string, amount: number) => string; export declare const saturateColor: (color: string, amount: number) => string; export declare const desaturateColor: (color: string, amount: number) => string; export declare const alphaColor: (color: string, alpha: number) => string; export declare const mixColors: (color1: string, color2: string, weight?: number) => string; export declare const getComplementColor: (color: string) => string; export declare const getTriadicColors: (color: string) => [string, string]; export declare const getAnalogousColors: (color: string) => [string, string]; export declare const isAccessibleColor: (foreground: string, background: string, level?: "AA" | "AAA") => boolean; export declare const getAccessibleTextColor: (background: string) => string; export declare const generateSemanticColors: typeof createSemanticColors; export declare const lighten: (color: string, amount: number) => string; export declare const darken: (color: string, amount: number) => string; export declare const saturate: (color: string, amount: number) => string; export declare const desaturate: (color: string, amount: number) => string; export declare const alpha: (color: string, alpha: number) => string; export declare const mix: (color1: string, color2: string, weight?: number) => string; export declare const complement: (color: string) => string; export declare const triadic: (color: string) => [string, string]; export declare const analogous: (color: string) => [string, string]; export declare const isAccessible: (foreground: string, background: string, level?: "AA" | "AAA") => boolean; export declare const getAccessibleText: (background: string) => string;