ColorPalette

This class is a base class for color palettes.

See also

SAMSON API: SBDColorPalette

class samson.DataModel.Color.ColorPalette(self: samson.DataModel.Color.ColorPalette) None

Bases: pybind11_builtins.pybind11_object

This class is a base class for color palettes.

Default constructor

class ColorPaletteType(self: samson.DataModel.Color.ColorPalette.ColorPaletteType, value: int) None

Bases: pybind11_builtins.pybind11_object

Members:

Custom : An undefined type - a custom color palette which does not fall into any of other categories

Qualitative : A qualitative color palette type - for coding categorical information, i.e., where no particular ordering of categories is available and every color should receive the same perceptual weight.

Sequential : A sequential color palette type - for coding ordered/numeric information, i.e., going from high to low (or vice versa).

Diverging : A diverging color palette type - for coding ordered/numeric information around a central neutral value, i.e., where colors diverge from neutral to two extremes.

FlexibleDiverging : A flexible diverging color palette type - for coding ordered/numeric information around a central neutral value, i.e., where colors diverge from neutral to two extremes.

Custom = <ColorPaletteType.Custom: 0>
Diverging = <ColorPaletteType.Diverging: 3>
FlexibleDiverging = <ColorPaletteType.FlexibleDiverging: 4>
Qualitative = <ColorPaletteType.Qualitative: 1>
Sequential = <ColorPaletteType.Sequential: 2>
property name
property value
clone(self: samson.DataModel.Color.ColorPalette) samson.DataModel.Color.ColorPalette

Returns a copy of the color palette

getColor(self: samson.DataModel.Color.ColorPalette, arg0: float) samson.DataModel.Type.Color

Returns SBColor based on the palette and an intensity value value which should be in the range [0.0, 1.0]

getColorInPaletteColorSpace(self: samson.DataModel.Color.ColorPalette, arg0: float) List[float]

Returns color coordinates in this palette’s color space for the given intensity value value which should be in the range [0.0, 1.0]

getColorVector(self: samson.DataModel.Color.ColorPalette, arg0: float) List[float]

Returns RGB color in a float vector based on the palette and an intensity value value which should be in the range [0.0, 1.0]

static getValueAlongLinearTrajectory(y1: float, y2: float, power: float, x: float) float

Returns a value along the linear trajectory

static getValueAlongTriangularTrajectory(y1: float, ymax: float, y2: float, power: float, x: float) float

Returns a value along the triangular trajectory

Custom = <ColorPaletteType.Custom: 0>
Diverging = <ColorPaletteType.Diverging: 3>
FlexibleDiverging = <ColorPaletteType.FlexibleDiverging: 4>
Qualitative = <ColorPaletteType.Qualitative: 1>
Sequential = <ColorPaletteType.Sequential: 2>
property isSerializable

Returns true when the class is serializable

property name

The color palette’s name

property reverseFlag

The reverse flag - whether the color palette is mirrored or not

property type

The color palette’s type