UNPKG

recharts

Version:
39 lines (38 loc) • 1.52 kB
import { RechartsTheme } from './RechartsTheme'; /** * Categorical series colors for a #18181b background. * * Order matters. Graphical items take colors from the front of this list (by * sorted dataKey), so a chart with N series always gets the first N entries. * The order is tuned so that every prefix stays distinguishable in typical * vision and under protanopia, deuteranopia and tritanopia, with the widest * separation in the first 4-8 entries where most charts live. * * Entries 1-8 share one band of lightness and chroma, so no series looks * heavier or more important than another. Entries 9-12 step outside that band * on purpose, because twelve hues at one lightness cannot all stay apart under * color vision deficiency. * * Every entry has at least 4.5:1 contrast against the background as a stroke, * the WCAG contrast for text, so a label in the series color stays readable. * Painted as an opaque fill (`fillOpacity` 1), every entry keeps the same contrast * (WCAG 1.4.11). * * Entry N is the same hue family in the light and dark palettes, so a series * keeps its identity when the theme changes. Comments show stroke contrast. * * @see {@link https://recharts.github.io/en-US/guide/theming/ Theming guide} * * @since 3.11 * @public */ export declare const darkPalette: ReadonlyArray<string>; /** * Dark mode theme * * @see {@link https://recharts.github.io/en-US/guide/theming/ Theming guide} * * @since 3.11 * @public */ export declare const darkTheme: RechartsTheme;