import { TreemapNodeData } from './treemapTypes'; /** * Returns true when a CSS color has transparency. */ export declare const isTransparentColor: (color?: string) => boolean; /** * Returns the appropriate text color (light or dark) for a given background color, * following WCAG luminance contrast guidelines. * * @param bgColor - CSS background color string * @returns '#ffffff' for dark backgrounds, '#000000' for light backgrounds */ export declare const getTextColorForBackground: (bgColor?: string) => string; /** * Returns the fill color for a treemap node based on series coloring. * Level 1 categories each get a distinct color from the palette. * * @param node - The node to color * @param seriesColors - The categorical color palette * @param categoryIndex - Map of root category name to palette index * @returns CSS color string */ export declare const getSeriesColor: (node: TreemapNodeData, seriesColors: string[], categoryIndex: Map) => string; /** * Darkens a CSS color by a factor (0-1). * factor=0 returns original, factor=1 returns black. */ export declare const darkenColor: (hex: string, factor: number) => string; /** * Lightens a CSS color by a factor (0-1). * factor=0 returns original, factor=1 returns white. */ export declare const lightenColor: (hex: string, factor: number) => string; /** * Returns a stroke color for a node rect that contrasts with the dashboard background. * Dark backgrounds get a lighter stroke; light backgrounds get a darker stroke. * * @param fillColor - The node's CSS fill color * @param bgColor - The dashboard CSS background color * @param factor - How much to lighten or darken (0-1) */ export declare const getStrokeColor: (fillColor: string, bgColor: string, factor: number) => string; export interface StandaloneNodeStyle { nodeFillColor: string; strokeColor: string; strokeWidth: number; } export declare const getStandaloneNodeStyle: ({ isSynthetic, backgroundColor, baseColor, strokeFactor, defaultStrokeWidth, }: { isSynthetic: boolean; backgroundColor: string; baseColor: string; strokeFactor: number; defaultStrokeWidth: number; }) => StandaloneNodeStyle; /** * Builds a map from Level 1 category names to their index in the color palette. */ export declare const buildCategoryIndex: (rootChildren: TreemapNodeData[]) => Map; /** * Determines whether label text should be light or dark based on the background color. * Uses WCAG relative luminance calculation. * * @param bgColor - CSS background color string * @returns 'light' or 'dark' */ export declare const getLabelColorMode: (bgColor: string) => "light" | "dark"; //# sourceMappingURL=treemapColorUtils.d.ts.map