autoPalette

Categorical series colors that follow the CSS color-scheme of the page.

Each entry pairs the same entry of lightPalette and darkPalette in a CSS light-dark() value, so the browser picks the light or the dark color. See autoTheme for how to set the color-scheme.

Use it to give explicit colors to graphical items that would otherwise share one theme color, for example <Scatter fill={autoPalette[1]} />.

light-dark() needs Chrome 123, Firefox 120, or Safari 17.5. Older browsers ignore these values, see autoTheme.

Available since Recharts 3.11