Skip to main content
Version: 1.x

@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

ParameterTypeDescription
inputColorRGBA64
outputStepsnumber
greyscaleConfigColorPaletteConfig
colorConfigColorPaletteConfig
Returns:

ColorPalette