SBPaletteQualitativeHCL#

This class is a base class for qualitative HCL (Hue-Chroma-Luminance) color palettes.

A qualitative HCL palette is constructed in a 3D color coordinate space with coordinates named hue, chroma, and luminance.

The coordinate h 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.

Example of a qualitative HCL palette#
# Qualitative: Pastel
palette = SBPaletteQualitativeHCL(
  hue1 = 0, hue2 = 360,
  chroma = 35,
  luminance = 85,
  name = "Qualitative: Pastel")

Note

You can find available default palettes in samson.SBPaletteDefaultPalette.

class samson.SBPaletteQualitativeHCL(*args, **kwargs)#

Bases: SBPaletteQualitative

This class is a base class for the qualitative HCL (Hue-Chroma-Luminance) color palette.

Overloaded function.

  1. __init__(self: samson.SBPaletteQualitativeHCL) -> None

Default constructor

  1. __init__(self: samson.SBPaletteQualitativeHCL, hue1: int, hue2: int, chroma: int = 50, luminance: int = 70, name: str = ‘’, reverse: bool = False) -> None

Constructs a qualitative HCL 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.

  • luminance (int, default=70) – The luminance coordinate.

  • name (str, default='') – A palette name

  • reverse (bool, default=False) – The reverse flag - whether the color palette is mirrored or not.

Examples

>>> palette = SBPaletteQualitativeHCL(hue1 = 60, hue2 = 270, chroma = 60, luminance = 80)
  1. __init__(self: samson.SBPaletteQualitativeHCL, palette: samson.SBPaletteQualitativeHCL) -> None

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

Parameters:

palette (samson.SBPaletteQualitativeHCL) – Another qualitative HCL color palette