import type { BoxelDefinition, Vec3 } from './types';
export declare const DEFAULT_SATURATION_FACTOR = 2;
export interface MaterialSample {
    materialId: string;
    baseColor: Vec3;
    opacity?: number | undefined;
    usageCount: number;
}
export interface LuminanceOptions {
    min: number;
    max: number;
    kneeLow?: number;
    kneeHigh?: number;
}
export interface SaturationResult {
    color: Vec3;
    luminance: number;
    clipped: boolean;
}
export interface LuminanceResult {
    color: Vec3;
    luminance: number;
}
export interface MaterialCluster {
    id: string;
    centerRgb: Vec3;
    centerLab: [number, number, number];
    totalCount: number;
    samples: MaterialSample[];
}
export declare function collectMaterialUsage(entity: BoxelDefinition): MaterialSample[];
export declare function rebalanceLuminance(color: Vec3, options: LuminanceOptions): LuminanceResult;
export declare function applySaturation(color: Vec3, options: {
    scale: number;
    luminance?: number;
}): SaturationResult;
export declare function mapLuminance(samples: MaterialSample[], options: LuminanceOptions): Array<MaterialSample & {
    color: Vec3;
    luminance: number;
}>;
export declare function mapSaturation(entries: Array<{
    color: Vec3;
    luminance: number;
}>, options: {
    scale: number;
}): Array<SaturationResult>;
export declare function rewriteEntityPalette(entity: BoxelDefinition, colors: Map<string, Vec3>): BoxelDefinition;
export declare function clusterMaterials(samples: MaterialSample[], options?: {
    deltaE?: number;
}): MaterialCluster[];
export interface AnalyzePaletteOptions {
    luminance?: Partial<LuminanceOptions>;
    saturationScale?: number;
}
export interface AnalyzedMaterial {
    materialId: string;
    baseColor: Vec3;
    opacity?: number | undefined;
    count: number;
    luminance: number;
    balancedColor: Vec3;
    balancedLuminance: number;
    saturatedColor: Vec3;
    saturatedLuminance: number;
    saturationClipped: boolean;
}
export declare function analyzePalette(entity: BoxelDefinition, options?: AnalyzePaletteOptions): AnalyzedMaterial[];
export declare const analyzeEntityMaterials: typeof analyzePalette;
