@microsoft/fast-colors > generateScaledPalettes
generateScaledPalettes() function
Generates two palettes of length shortPaletteLength and longPaletteLength from a base color. The base color is compared to the default greyscale palette to determine where it should be placed. The short palette is then fed into centeredRescale to create the long palette. The colors in the short palette are always contained within the long.
Signature:export declare function generateScaledPalettes(input: ColorRGBA64, shortPaletteLength?: number, config?: CenteredRescaleConfig): {
short: ColorRGBA64[];
long: ColorRGBA64[];
};
Parameters
Parameter | Type | Description |
---|---|---|
input | ColorRGBA64 | |
shortPaletteLength | number | |
config | CenteredRescaleConfig |
{ short: ColorRGBA64[]; long: ColorRGBA64[]; }