/** * Browser-backed color mixing via CSS `color-mix()`. * * Uses a hidden DOM element + `getComputedStyle` to resolve expressions, * cached so each unique expression is computed at most once. */ /** * Mix two CSS colors using the browser's `color-mix(in srgb)` function. * * @param color1 - First color (any valid CSS color string) * @param color2 - Second color (any valid CSS color string) * @param percentage - Percentage of `color1` in the mix (0–100) * @returns {string} Resolved color as an `rgb()` string, or `color1` if resolution fails */ export declare const mixColor: (color1: string, color2: string, percentage: number) => string; /** * Darken a CSS color by mixing it with black. * * @param color - Any valid CSS color string * @param amount - Darkening intensity from 0 (no change) to 100 (pure black) */ export declare const darkenColor: (color: string, amount: number) => string; /** * Lighten a CSS color by mixing it with white. * * @param color - Any valid CSS color string * @param amount - Lightening intensity from 0 (no change) to 100 (pure white) */ export declare const lightenColor: (color: string, amount: number) => string; /** * Resolve a CSS color and apply an opacity multiplier to its alpha channel. * * Unlike setting `element.style.opacity`, this only affects the individual * color value — useful when fill and stroke need independent opacity. * * @param color - Any valid CSS color string * @param opacity - Opacity multiplier from 0 to 1 (multiplied with existing alpha) * @returns {string} `rgba()` string with the combined alpha, or the original color if resolution fails */ export declare const colorWithOpacity: (color: string, opacity: number) => string; /** * Clear the resolved-color cache and detach the probe element. * Exposed for test teardown only — not part of the public API. */ export declare const resetColorUtilsForTesting: () => void;