ColorPaletteQualitative

This class is a base class for qualitative color palettes.

See also

SAMSON API: SBDColorPaletteQualitative

class samson.DataModel.Color.ColorPaletteQualitative(*args, **kwargs)

Bases: samson.DataModel.Color.ColorPalette

This class is a base class for qualitative color palettes.

Overloaded function.

  1. __init__(self: samson.DataModel.Color.ColorPaletteQualitative) -> None

Default constructor

  1. __init__(self: samson.DataModel.Color.ColorPaletteQualitative, hue1: int, hue2: int, chroma: int, luminance: int, name: str) -> None

Constructs a qualitative color palette with the given parameters

  1. __init__(self: samson.DataModel.Color.ColorPaletteQualitative, otherColorPalette: samson.DataModel.Color.ColorPaletteQualitative) -> None

Constructs a qualitative color palette based on the given qualitative color palette

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

setHue(self: samson.DataModel.Color.ColorPaletteQualitative, hue1: int, hue2: int) None
Custom = <ColorPaletteType.Custom: 0>
Diverging = <ColorPaletteType.Diverging: 3>
FlexibleDiverging = <ColorPaletteType.FlexibleDiverging: 4>
Qualitative = <ColorPaletteType.Qualitative: 1>
Sequential = <ColorPaletteType.Sequential: 2>
property chroma
property hue1
property hue2
property isSerializable

Returns true when the class is serializable

property luminance
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