@amcharts/amcharts5
Version:
amCharts 5
63 lines • 2.12 kB
TypeScript
import { Color } from "../core/util/Color";
import { Theme } from "../core/Theme";
import type { Root } from "../core/Root";
/**
* Options for {@link AdaptiveTheme}.
*/
export interface IAdaptiveThemeSettings {
/**
* Primary base color. The generated palette and (in dark mode) the interface
* colors are derived from it. Accepts a hex number, a CSS string, or a
* [[Color]].
*
* If omitted, the theme defaults to a green-to-yellow gradient (`#4b8e39`
* first, `#ffdd00` last).
*/
baseColor?: number | string | Color;
/**
* Optional second base color. When provided, the palette spans the two
* colors (perceptually interpolated in OKLCH) instead of fanning out from a
* single hue.
*/
baseColor2?: number | string | Color;
/**
* Number of series colors to generate.
*
* @default 10
*/
count?: number;
/**
* Produce a dark variant: a faintly base-tinted dark background and matching
* interface colors.
*
* @default false
*/
dark?: boolean;
}
/**
* "Adaptive" — generates a full palette from one or two base colors, choosing
* the other colors automatically in OKLCH so they stay perceptually balanced
* (even lightness/chroma, evenly spread hues).
*
* Because a theme cannot take constructor parameters, this ships as a **factory
* function**:
*
* ```TypeScript
* root.setThemes([
* am5themes_Adaptive(root, { baseColor: 0x2c6e91, dark: true })
* ]);
* ```
*
* The first generated color is the base color itself, so a brand color always
* appears in the chart. This theme is additive; it does not modify any built-in
* theme.
*
* @see {@link https://www.amcharts.com/docs/v5/concepts/themes/} for more info
* @important
*/
export declare function AdaptiveTheme(root: Root, settings?: IAdaptiveThemeSettings): Theme;
export declare namespace AdaptiveTheme {
var _a: (root: Root, settings?: IAdaptiveThemeSettings) => Theme;
export { _a as new };
}
//# sourceMappingURL=AdaptiveTheme.d.ts.map