import type { ColorValue } from "./theme-schema.ts";
export type ColorMode = "truecolor" | "256color";
export declare function detectColorMode(): ColorMode;
export declare function hexToRgb(hex: string): {
    r: number;
    g: number;
    b: number;
};
export declare function fgAnsi(color: string | number, mode: ColorMode): string;
export declare function bgAnsi(color: string | number, mode: ColorMode): string;
export declare function resolveVarRefs(value: ColorValue, vars: Record<string, ColorValue>, visited?: Set<string>): string | number;
export declare function resolveThemeColors<T extends Record<string, ColorValue>>(colors: T, vars?: Record<string, ColorValue>): Record<keyof T, string | number>;
/**
 * 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