/** A palette measured off a real display; the same tuples dither.nim holds. */ type Rgb = readonly [number, number, number]; /** The panel kinds a preview can be shown through. */ export type PanelPaletteKey = 'spectra6' | 'sevenColor' | 'fourColor' | 'blackWhiteRed' | 'blackWhiteYellow' | 'sixteenGray' | 'fourGray' | 'blackWhite'; type PanelPalette = { readonly key: PanelPaletteKey; readonly label: string; readonly colors: readonly Rgb[]; } | { readonly key: PanelPaletteKey; readonly label: string; readonly grayLevels: number; }; /** In the order the picker offers them: colour panels first, then greys. */ export declare const panelPalettes: readonly PanelPalette[]; export declare function panelPaletteFor(key: string | null | undefined): PanelPalette | null; /** * Re-colours an RGBA frame in place the way `panel` would show it. Alpha is * left alone; the runtime hands us opaque frames, the same picture the * driver dithers. */ export declare function ditherFrame(data: Uint8ClampedArray, width: number, height: number, panel: PanelPalette): void; export {};