/**
 * paletteExtractor — Extract color palettes from images
 *
 * Features:
 * - K-means clustering for dominant colors
 * - Median cut algorithm
 * - Octree quantization
 * - Color sorting options
 * - Palette size control
 * - Common palette format imports (GPL, PAL, ASE, ACO)
 */
export interface RGB {
    r: number;
    g: number;
    b: number;
}
export interface PaletteColor extends RGB {
    hex: string;
    count: number;
    percentage: number;
}
export type ExtractionAlgorithm = 'kmeans' | 'median-cut' | 'octree' | 'frequency';
export type SortOrder = 'frequency' | 'hue' | 'saturation' | 'lightness' | 'brightness' | 'none';
export interface ExtractionOptions {
    /** Number of colors to extract */
    colorCount: number;
    /** Algorithm to use */
    algorithm: ExtractionAlgorithm;
    /** Sort order for results */
    sortOrder: SortOrder;
    /** Minimum color difference (0-255) to include similar colors */
    minDifference: number;
    /** Sample rate (1 = every pixel, 2 = every 2nd, etc.) */
    sampleRate: number;
    /** Ignore transparent pixels */
    ignoreTransparent: boolean;
}
export declare const DEFAULT_EXTRACTION_OPTIONS: ExtractionOptions;
export declare function rgbToHex(r: number, g: number, b: number): string;
export declare function hexToRgb(hex: string): RGB;
export declare function colorDistance(c1: RGB, c2: RGB): number;
export declare function rgbToHsl(r: number, g: number, b: number): {
    h: number;
    s: number;
    l: number;
};
export declare function getBrightness(r: number, g: number, b: number): number;
export declare function extractPalette(imageData: ImageData, options?: Partial<ExtractionOptions>): PaletteColor[];
/**
 * Extract palette from image/canvas element
 */
export declare function extractPaletteFromImage(source: HTMLImageElement | HTMLCanvasElement, options?: Partial<ExtractionOptions>): PaletteColor[];
/**
 * Parse GIMP Palette (.gpl) format
 */
export declare function parseGplPalette(content: string): string[];
/**
 * Parse Paint.NET/JASC Palette (.pal) format
 */
export declare function parsePalPalette(content: string): string[];
/**
 * Parse hex color list (one per line)
 */
export declare function parseHexPalette(content: string): string[];
/**
 * Export palette to GPL format
 */
export declare function exportToGpl(colors: string[], name?: string): string;
/**
 * Export palette to PAL format
 */
export declare function exportToPal(colors: string[]): string;
export default extractPalette;
