Skip to content

IAdaptiveThemeSettings

Type interface

Options for AdaptiveTheme.

Sources

IAdaptiveThemeSettings is an interface: it describes a shape of data and is not imported on its own.

Properties

baseColor

Type number | string | Color

The color the palette is built from, and its first color, as a hex number, a CSS string or a Color. It also colors the primary buttons, and in dark mode tints all interface colors. If not set, green #4b8e39 is used, and baseColor2 defaults to yellow #ffdd00.

baseColor2

Type number | string | Color

A second color: the palette then runs as a gradient from baseColor to this one, instead of spreading out over the color wheel.

count

Type undefined | numberDefault 10

Number of series colors to make.

dark

Type undefined | false | trueDefault false

Makes a dark theme, with a dark background and interface colors faintly tinted with the hue of baseColor.

interleave

Type undefined | false | trueDefault false

Takes the colors in an alternating order (1, 4, 2, 5, 3, 6), so series next to each other differ more. Most useful with baseColor2, whose gradient puts similar colors side by side.

keepContrast

Type boolean | numberDefault false

Lightens (in dark mode) or darkens colors that would have too little contrast with the background, keeping their hue: true for at least 3:1, or a ratio, e.g. 4.5. Applies to the series colors, baseColor and baseColor2 included, and the primary buttons.

mapShade

Type undefined | false | trueDefault false

Fills map polygons with a mid shade of baseColor, as light as a map's default land, instead of baseColor itself.

repeatLightness

Type boolean | numberDefault 0.1

Once every color has been used, each new round of colors is this much lighter (HSL lightness: 0.1 is 10%; a negative value makes it darker) instead of the same colors again. true is 0.1; false or 0 repeats the colors as they are.