import { type ColorScale, type FieldInstance, type Row, type Value } from './types'; /** * Every color the sheet paints. The first six are the surface, text and rules; the rest * color the marks. A host passes its own to make the sheet follow its theme. */ export interface Theme { paper: string; text: string; muted: string; line: string; grid: string; zero: string; /** Color of marks when no field is on color. */ mark: string; /** Colors of the members of a discrete color field, in legend order. Reused from the start when there are more members. */ category: string[]; /** Stops for a continuous color field whose range stays on one side of zero, from the value nearest zero to the furthest. */ ramp: string[]; /** Stops for a continuous color field whose range crosses zero, from the negative end through the middle to the positive end. */ diverging: string[]; /** Stops for the cells of a heat map, when they differ from `ramp`. */ heatmap?: string[]; /** Font family of every text. The system font when absent. */ font?: string; /** Dash and gap of grid lines in px. Solid when absent. The zero line is always solid. */ gridDash?: [number, number]; /** Width of line marks in px, where no field is on size. */ lineWidth?: number; /** Width of the outline of point marks in px. */ pointStrokeWidth?: number; /** Draws point marks filled, like circle marks. */ pointFilled?: boolean; /** Rounds the far end of bars by this many px. */ barRadius?: number; } export declare const lightTheme: Theme; export declare const darkTheme: Theme; /** Red, green and blue of a hex or rgb() color. Anything else reads as the missing-value grey. */ export declare function rgb(color: string): [number, number, number]; /** * Color of a value on a continuous scale. A range on one side of zero runs along the ramp, * further from zero meaning further along it. A range that crosses zero runs along the * diverging stops with zero in the middle and both sides scaled by the larger magnitude. * `cells` picks the heat map stops where the theme has them. */ export declare function continuousColor(scale: ColorScale, value: number, theme?: Theme, cells?: boolean): string; /** Fill of a record, for a categorical color field, a continuous one, or none. */ export declare function fillOf(field: FieldInstance | undefined, colors: Value[], scale: ColorScale | undefined, theme?: Theme, cells?: boolean): (record: Row) => string;