Skip to content

Color Palette Config

Configure the color palettes to use for collections of series.

Every property is optional and falls back to its default. Property anchors are stable: link to any entry as #colorPalette.propertyName, and to a member of a nested property as #colorPalette.propertyName.memberName.

errorBar

The color palettes to use for series error bars that are colored by series or category index.

  • Default: { normal: { … }, focused: { … }, defocused: { … } }
  • Validation: should be an object with any of the properties { defocused, focused, normal }

errorBar.defocused

The palette to use for the defocused error bars.

  • Default: { strokeColors: [ … ], fillColors: [ … ] }
  • Validation: should be an object with any of the properties { fillColors, strokeColors }

errorBar.defocused.fillColors

The colors to use for fills, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color

errorBar.defocused.strokeColors

The colors to use for strokes, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color

errorBar.focused

The palette to use for the focused error bars.

  • Default: { strokeColors: [ … ], fillColors: [ … ] }
  • Validation: should be an object with any of the properties { fillColors, strokeColors }

errorBar.focused.fillColors

The colors to use for fills, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color

errorBar.focused.strokeColors

The colors to use for strokes, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color

errorBar.normal

The palette to use while nothing has focus.

  • Default: { strokeColors: [ … ], fillColors: [ … ] }
  • Validation: should be an object with any of the properties { fillColors, strokeColors }

errorBar.normal.fillColors

The colors to use for fills, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color

errorBar.normal.strokeColors

The colors to use for strokes, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color

label

The color palettes to use for series labels that are colored by series or category index.

  • Default: { normal: { … }, focused: { … }, defocused: { … } }
  • Validation: should be an object with any of the properties { defocused, focused, normal }

label.defocused

The palette to use for the defocused labels.

  • Default: { strokeColors: [ … ], fillColors: [ … ] }
  • Validation: should be an object with any of the properties { fillColors, strokeColors }

label.defocused.fillColors

The colors to use for fills, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color

label.defocused.strokeColors

The colors to use for strokes, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color

label.focused

The palette to use for the focused labels.

  • Default: { strokeColors: [ … ], fillColors: [ … ] }
  • Validation: should be an object with any of the properties { fillColors, strokeColors }

label.focused.fillColors

The colors to use for fills, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color

label.focused.strokeColors

The colors to use for strokes, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color

label.normal

The palette to use while nothing has focus.

  • Default: { strokeColors: [ … ], fillColors: [ … ] }
  • Validation: should be an object with any of the properties { fillColors, strokeColors }

label.normal.fillColors

The colors to use for fills, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color

label.normal.strokeColors

The colors to use for strokes, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color

marker

The color palettes to use for series markers that are colored by series or category index.

  • Default: { normal: { … }, focused: { … }, defocused: { … } }
  • Validation: should be an object with any of the properties { defocused, focused, normal }

marker.defocused

The palette to use for the defocused markers.

  • Default: { strokeColors: [ … ], fillColors: [ … ] }
  • Validation: should be an object with any of the properties { fillColors, strokeColors }

marker.defocused.fillColors

The colors to use for fills, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color

marker.defocused.strokeColors

The colors to use for strokes, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color

marker.focused

The palette to use for the focused markers.

  • Default: { strokeColors: [ … ], fillColors: [ … ] }
  • Validation: should be an object with any of the properties { fillColors, strokeColors }

marker.focused.fillColors

The colors to use for fills, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color

marker.focused.strokeColors

The colors to use for strokes, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color

marker.normal

The palette to use while nothing has focus.

  • Default: { strokeColors: [ … ], fillColors: [ … ] }
  • Validation: should be an object with any of the properties { fillColors, strokeColors }

marker.normal.fillColors

The colors to use for fills, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color

marker.normal.strokeColors

The colors to use for strokes, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color

shape

The color palettes to use for series shapes that are colored by series or category index.

The fallback coloring for series that do not set explicit colors: each series takes the palette entry for its series index (or its category index, for series configured to color by category index). The focused/defocused variants apply while another element has focus. The built-in arrays use Paul Tol's Bright qualitative color scheme, designed to be color-blind safe.

shape.defocused

The palette to use for the defocused shapes.

  • Default: { strokeColors: [ … ], fillColors: [ … ] }
  • Validation: should be an object with any of the properties { fillColors, strokeColors }

shape.defocused.fillColors

The colors to use for fills, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color

shape.defocused.strokeColors

The colors to use for strokes, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color

shape.focused

The palette to use for the focused shapes.

  • Default: { strokeColors: [ … ], fillColors: [ … ] }
  • Validation: should be an object with any of the properties { fillColors, strokeColors }

shape.focused.fillColors

The colors to use for fills, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color

shape.focused.strokeColors

The colors to use for strokes, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color

shape.normal

The palette to use while nothing has focus.

shape.normal.fillColors

The colors to use for fills, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color
  • Used in: Colors and theming

shape.normal.strokeColors

The colors to use for strokes, taken by series or category index and wrapping around when there are more series than colors.

  • Default:
  • Validation: should be a non-empty array with elements that should be a valid color
  • Used in: Colors and theming

Released under the MIT License.