ColorPalette Class

Source: MtxGridSeries.cs · Assembly: Dew.Math.TeePro

public class ColorPalette

Computes different color palettes.

Stores parameters and computes different color palettes. It support transitions between two colors, three colors, rainbow transition between two colors and rainbow transitions between three colors. Rainbow and non-rainbow transitions can be mixed in three color models. Top and bottom clip off colors can be specified separately.

Properties

NameTypeDescription
BottomColorColorDefines color for the minimum value.
ColorBalanceDoubleDefines the color balance.
ColorBalanceMidDoubleDefines the mid color balance for three color model.
MidColorColorDefines color for medium value.
PaletteScalePaletteScaleDefines how to manage the automatic palette scaling.
PaletteStepsInt32Defines number of palette steps.
PaletteStyleGridPaletteStyleDefines palette style.
RainbowRainbowSettingsDefines the rainbow color mixing.
SharpConstrastBooleanActivates sharp contrast feature.
TopColorColorDefines color for the maximum value.
UseMidColorBooleanReturns true if middle color is used (three colors).

Methods

NameDescription
AddAdd new custom palette level/entry.
ClearClears the palette entries.
CreateCustomRangePaletteCreate equidistant palette entries/levels.
CreateDefaultPaletteCreate default palette entries/levels.
CreatePeakHoldPaletteCreate default palette entries/levels, but keep the scale.
ctorColor palette constructor.
GetColorThe color from the current color palette.
ResetPeakScaleResets the scales in case of Peak-hold palette style.
SwapToBottomColorsSwaps top and bottom colors.

Events

NameDescription
UpdateColorCalled when the color parameters are updated.