/** * Pure color conversion functions using culori * * All functions return Effects and use schema decoders for proper validation. * OKLCH is used as the internal representation for all color manipulations. * * Note: For input parsing from strings, use `parseColorStringToOKLCH` from schemas/color.ts */ import { Effect } from "effect"; import type { ParseError } from "effect/ParseResult"; import { type HexColor as HexColorType, type OKLABColor, type OKLCHColor, type RGBColor } from "../../schemas/color.js"; import { ColorConversionError } from "./errors.js"; /** * Convert OKLCH to hex string * Returns an Effect that validates the result with HexColor schema */ export declare const oklchToHex: (color: OKLCHColor) => Effect.Effect; /** * Convert OKLCH to RGB */ export declare const oklchToRGB: (color: OKLCHColor) => Effect.Effect; /** * Convert RGB to OKLCH */ export declare const rgbToOKLCH: (color: RGBColor) => Effect.Effect; /** * Convert OKLCH to OKLAB */ export declare const oklchToOKLAB: (color: OKLCHColor) => Effect.Effect; /** * Convert OKLAB to OKLCH */ export declare const oklabToOKLCH: (color: OKLABColor) => Effect.Effect; /** * Check if a color is displayable in sRGB gamut */ export declare const isDisplayable: (color: OKLCHColor) => Effect.Effect; /** * Clamp a color to the displayable sRGB gamut by reducing chroma */ export declare const clampToGamut: (color: OKLCHColor) => Effect.Effect; /** * Normalize hue to [0, 360) range */ export declare const normalizeHue: (hue: number) => number; /** * Calculate the difference between two hues (accounting for circularity) * Returns the shortest angular distance between h1 and h2 */ export declare const hueDifference: (h1: number, h2: number) => number; /** * Clamp a value between min and max */ export declare const clamp: (value: number, min: number, max: number) => number; //# sourceMappingURL=conversions.d.ts.map