Class: ColorMapFactory
Defined in: src/display/ColorMapFactory.ts:22
Factory class for creating ColorMap instances
Constructors
Constructor
new ColorMapFactory(): ColorMapFactory;Returns
ColorMapFactory
Methods
createGrayscale()
static createGrayscale(config?): ColorMap;Defined in: src/display/ColorMapFactory.ts:76
Create a grayscale ColorMap
Parameters
config?
Partial<PresetConfig>
Returns
createHot()
static createHot(config?): ColorMap;Defined in: src/display/ColorMapFactory.ts:93
Create a hot ColorMap (black -> red -> yellow -> white)
Parameters
config?
Partial<PresetConfig>
Returns
fromPreset()
static fromPreset(presetName, config?): ColorMap;Defined in: src/display/ColorMapFactory.ts:126
Create a ColorMap from a preset name
Parameters
presetName
string
config?
Partial<PresetConfig>
Returns
fromColors()
static fromColors(colors, config?): ColorMap;Defined in: src/display/ColorMapFactory.ts:151
Create a ColorMap from a custom color array
Parameters
colors
(string | Color)[]
config?
Partial<PresetConfig>
Returns
createGradient()
static createGradient(
startColor,
endColor,
steps?,
config?): ColorMap;Defined in: src/display/ColorMapFactory.ts:172
Create a ColorMap with a linear gradient between two colors
Parameters
startColor
string | Color
endColor
string | Color
steps?
number = 256
config?
Partial<PresetConfig>
Returns
createMultiStop()
static createMultiStop(
colorStops,
steps?,
config?): ColorMap;Defined in: src/display/ColorMapFactory.ts:197
Create a ColorMap with multiple color stops
Parameters
colorStops
(string | Color)[]
steps?
number = 256
config?
Partial<PresetConfig>
Returns
getAvailablePresets()
static getAvailablePresets(): string[];Defined in: src/display/ColorMapFactory.ts:222
Get list of available preset names
Returns
string[]
createCategorical()
static createCategorical(numCategories, config?): ColorMap;Defined in: src/display/ColorMapFactory.ts:230
Create a ColorMap suitable for label/cluster data
Parameters
numCategories
number
config?
Partial<PresetConfig>
Returns
createDiverging()
static createDiverging(
negativeColor?,
neutralColor?,
positiveColor?,
steps?,
config?): ColorMap;Defined in: src/display/ColorMapFactory.ts:255
Create a diverging ColorMap (good for data with a meaningful center point)
Parameters
negativeColor?
string | Color
neutralColor?
string | Color
positiveColor?
string | Color
steps?
number = 256
config?
Partial<PresetConfig>