/** * Palette registry. * * Anchor stops only: the actual class colours are sampled in OkLab at render * time so a 4-class and a 9-class map of the same data stay perceptually * consistent. * * Sequential and diverging ramps follow the ColorBrewer families (Brewer and * Harrower), which are the de-facto standard for thematic cartography and are * colourblind-checked. `viridis` and `magma` come from the matplotlib * colormaps, which are perceptually uniform and CC0. * * @module scales/Palettes */ export type PaletteKind = 'sequential' | 'diverging' | 'categorical'; export interface Palette { kind: PaletteKind; stops: string[]; colorblindSafe?: boolean; } export declare function registerPalette(name: string, palette: Palette): void; export declare function getPalette(name: string): Palette | undefined; export declare function listPalettes(): string[]; export declare function hasPalette(name: string): boolean; /** * Pick a sensible default palette for a domain. * * A domain that straddles zero is almost always an anomaly, change, margin or * difference, so it gets a diverging ramp anchored at zero. Everything else gets * a sequential ramp. Choosing this automatically prevents the single most common * palette error: a sequential ramp on signed data, which hides the sign. * */ export declare function defaultPaletteFor(domain: [number, number]): string; //# sourceMappingURL=Palettes.d.ts.map