@microsoft/fast-colors > generateOffCenterPalette

generateOffCenterPalette() function

Generates a greyscale palette using greyscaleConfig. The Lightness (in HSL) of the input color is then compared to the greyscale palette to determine how far off center the input color should be placed. The output palette is then generated with outputSteps number of steps using colorConfig.

Signature:

export declare function generateOffCenterPalette(input: ColorRGBA64, outputSteps: number, greyscaleConfig?: ColorPaletteConfig, colorConfig?: ColorPaletteConfig): ColorPalette;

Parameters

Parameter Type Description
input ColorRGBA64
outputSteps number
greyscaleConfig ColorPaletteConfig
colorConfig ColorPaletteConfig

Returns:

ColorPalette