import type { ColorValue } from "./theme-schema.ts"; export type ColorMode = "truecolor" | "256color"; export declare function detectColorMode(): ColorMode; /** * Resolve the color mode for a theme from an explicit `terminal.trueColor` setting, then * `PI_TRUE_COLOR=1|0`, then terminal detection. */ export declare function resolveColorMode(trueColorSetting: boolean | undefined): ColorMode; export declare function hexToRgb(hex: string): { r: number; g: number; b: number; }; /** * `nearest` picks the closest cube or grayscale entry. `preserve-hue` picks the closest entry whose strongest * channels are the same as the input's, so a tinted color keeps its hue instead of collapsing to a gray. */ export type Quantization = "nearest" | "preserve-hue"; export declare function fgAnsi(color: string | number, mode: ColorMode): string; export declare function bgAnsi(color: string | number, mode: ColorMode, quantization?: Quantization): string; export declare function resolveVarRefs(value: ColorValue, vars: Record, visited?: Set): string | number; export declare function resolveThemeColors>(colors: T, vars?: Record): Record; /** * Convert a 256-color index to hex string. * Indices 0-15: basic colors (approximate) * Indices 16-231: 6x6x6 color cube * Indices 232-255: grayscale ramp */ export declare function ansi256ToHex(index: number): string; //# sourceMappingURL=color-utils.d.ts.map