UNPKG

@legumeinfo/taxon-symbology

Version:

A TypeScript library for consistent coloring of visualizations by genus & species

18 lines 553 B
export type ColorMap = { [key: string]: string | number; }; export declare const genera: string[]; export type GetOptions = { lightnessFactor?: number; overrides?: ColorMap; }; export declare class TaxonChroma { static readonly LIGHTNESS_FACTOR = 1; static readonly MIN_LIGHTNESS = 0.3; readonly defaultColor: string; private colorCache; constructor(defaultColor?: string); get(taxon: string, options?: GetOptions): string | number; } export declare const taxonChroma: TaxonChroma; //# sourceMappingURL=index.d.ts.map