SBPaletteQualitative#
This class is a base class for qualitative color palettes.
A qualitative palette is constructed in a 3D color coordinate space with coordinates named hue
, chroma
, and luminance
.
The coordinate hue
can have an arbitrary value:
hue = hue1 + i * (hue2 - hue1)
,
where i
is a value (of intensity) based on which the colorization should be done.
And chroma
and luminance
coordinates are constant.
Coordinate hue
can designate e.g. hue (as in HCL, HSV, HSL color spaces).
Coordinate chroma
can designate e.g. chroma (as in HCL color space) or saturation (as in HSV, HSL color spaces).
Coordinate luminance
can designate e.g. luminance (as in HCL color space), lightning (as in HSL color space), or another value (as in HSV color space).
- class samson.SBPaletteQualitative(*args, **kwargs)#
Bases:
SBPalette
This class is a base class for qualitative color palettes.
Overloaded function.
__init__(self: samson.SBPaletteQualitative) -> None
Default constructor
__init__(self: samson.SBPaletteQualitative, hue1: int, hue2: int, chroma: int = 50, luminance: int = 70, name: str = ‘’, reverse: bool = False) -> None
Constructs a qualitative color palette with the given parameters.
- Parameters:
hue1 (int) – The left-side hue
hue2 (int) – The right-side hue
chroma (int, default=50) – The chroma coordinate can designate e.g. chroma (as in HCL color space) or saturation (as in HSV, HSL color spaces).
luminance (int, default=70) – The luminance coordinate can designate e.g. luminance (as in HCL color space), lightning (as in HSL color space), or another value (as in HSV color space).
name (str, default='') – A palette name
reverse (bool, default=False) – The reverse flag - whether the color palette is mirrored or not.
Examples
>>> palette = SBPaletteQualitative(hue1 = 60, hue2 = 270, chroma = 60, luminance = 80)
__init__(self: samson.SBPaletteQualitative, palette: samson.SBPaletteQualitative) -> None
Constructs a qualitative color palette based on the given qualitative color palette.
- Parameters:
palette (samson.SBPaletteQualitative) – Another qualitative color palette
- setHue(self: samson.SBPaletteQualitative, hue1: int, hue2: int) None #
Sets hue values.
- Parameters:
hue1 (int) – The left-side hue
hue2 (int) – The right-side hue
- property chroma#
- property hue1#
- property hue2#
- property luminance#