Web Analytics Made Easy - Statcounter
Skip to content

Class SBDPaletteFlexibleDivergingHCL#

ClassList > SBDPaletteFlexibleDivergingHCL

The SBDPaletteFlexibleDivergingHCL class is a class for the flexible diverging HCL (Hue-Chroma-Luminance) color palette.More...

  • #include <SBDPaletteFlexibleDivergingHCL.hpp>

Inherits the following classes: SBDPalette

Public Types inherited from SBDPalette#

See SBDPalette

Type Name
enum PaletteType
The three different types of palettes - qualitative, sequential, and diverging - are all constructed by combining three different types of trajectories (constant, linear, triangular) for the three different coordinates in the given color space (e.h.: hue H, chroma C, luminance L)

Public Functions#

Type Name
SBDPaletteFlexibleDivergingHCL ()
Default constructor.
SBDPaletteFlexibleDivergingHCL (int hue1, int hue2, int hue3, int chroma1, int chroma2, int chroma3, int luminance1=70, int luminance2=70, int luminance3=70, float chromaPower1=1.0f, float luminancePower1=1.0f, float chromaPower2=1.0f, float luminancePower2=1.0f, int maximumChroma1=50, int maximumChroma2=50, float neutralPoint=0.5f, std::string name=std::string(""), bool reverse=false)
Builds a flexible diverging HCL palette with the given parameters.
SBDPaletteFlexibleDivergingHCL (const SBDPaletteFlexibleDivergingHCL & otherColorPalette)
Copy constructor.
virtual SBDPaletteFlexibleDivergingHCL * clone () override const
Clones the color palette.
int getChroma1 () const
Returns the starting value for the second coordinate.
int getChroma2 () const
Returns the center value for the second coordinate.
int getChroma3 () const
Returns the end value for the second coordinate.
float getChromaPower1 () const
Returns the power of the intensity value for the computation of the second coordinate in the first sequential palette.
float getChromaPower2 () const
Returns the power of the intensity value for the computation of the second coordinate in the second sequential palette.
virtual void getColor (float * color, float value) override const
Computes sRGB color color based on this palette for the given intensity valuevalue which should be in the range [0.0, 1.0].
virtual void getColorInPaletteColorSpace (float * color, float value) override const
Computes color coordinates color in this palette's color space for the given intensity valuevalue which should be in the range [0.0, 1.0].
int getHue1 () const
Returns the starting value for the first coordinate.
int getHue2 () const
Returns the center value for the first coordinate.
int getHue3 () const
Returns the end value for the first coordinate.
int getLuminance1 () const
Returns the starting value for the third coordinate.
int getLuminance2 () const
Returns the center value for the third coordinate.
int getLuminance3 () const
Returns the end value for the third coordinate.
float getLuminancePower1 () const
Returns the power of the intensity value for the computation of the third coordinate in the first sequential palette.
float getLuminancePower2 () const
Returns the power of the intensity value for the computation of the third coordinate in the second sequential palette.
int getMaximumChroma1 () const
Returns the max value for the second coordinate in the first sequential palette.
int getMaximumChroma2 () const
Returns the max value for the second coordinate in the second sequential palette.
float getNeutralPoint () const
Returns the neutral point position.
virtual PaletteType getType () override const
Returns the type of the color palette.
virtual bool isEqual (const SBDPalette & other) override const
Returns whether this palette is equal to other .
virtual bool isSerializable () override const
Returns true __
virtual void serialize (SBCSerializer * serializer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber(1, 0, 0)) override const
Serializes the palette.
void setChroma (int chroma1, int chroma2, int chroma3, int maximumChroma1, int maximumChroma2, float chromaPower1=1.0f, float chromaPower2=1.0f)
Sets the parameters for the second coordinate.
void setChroma1 (int chroma)
Sets the starting value for the second coordinate.
void setChroma2 (int chroma)
Sets the center value for the second coordinate.
void setChroma3 (int chroma)
Sets the end value for the second coordinate.
void setChromaPower1 (float chromaPower)
Sets the power of the intensity value for the computation of the second coordinate in the first sequential palette, the power should be greater than 0.
void setChromaPower2 (float chromaPower)
Sets the power of the intensity value for the computation of the second coordinate in the second sequential palette, the power should be greater than 0.
void setHue (int hue1, int hue2, int hue3)
Sets the parameters for the first coordinate.
void setHue1 (int hue)
Sets the starting value for the first coordinate.
void setHue2 (int hue)
Sets the center value for the first coordinate.
void setHue3 (int hue)
Sets the end value for the first coordinate.
void setLuminance (int luminance1, int luminance2, int luminance3, float luminancePower1=1.0f, float luminancePower2=1.0f)
Sets the parameters for the third coordinate.
void setLuminance1 (int luminance)
Sets the starting value for the third coordinate.
void setLuminance2 (int luminance)
Sets the center value for the third coordinate.
void setLuminance3 (int luminance)
Sets the end value for the third coordinate.
void setLuminancePower1 (float luminancePower)
Sets the power of the intensity value for the computation of the third coordinate in the first sequential palette, the power should be greater than 0.
void setLuminancePower2 (float luminancePower)
Sets the power of the intensity value for the computation of the third coordinate in the second sequential palette, the power should be greater than 0.
void setMaximumChroma1 (int maximumChroma)
Sets the max value for the second coordinate in the first sequential palette.
void setMaximumChroma2 (int maximumChroma)
Sets the max value for the second coordinate in the second sequential palette.
void setNeutralPoint (float neutralPoint)
Sets the neutral point position, should be in the range [0.0, 1.0].
virtual std::string toPythonCode () override const
Returns the string representation of the object that can be used to reconstruct it in Python.
virtual void unserialize (SBCSerializer * serializer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber(1, 0, 0)) override
Unserializes the palette.
virtual ~SBDPaletteFlexibleDivergingHCL ()
Destructor.

Public Functions inherited from SBDPalette#

See SBDPalette

Type Name
SBDPalette ()
Default constructor for HSV color palette.
SBDPalette (bool reverse)
Constructor for HSV color palette with reverse flag.
virtual SBDPalette * clone () const
Clones the palette.
SBColor getColor (float value) const
Returns SBColor based on the palette and an intensity value value .
virtual void getColor (float * color, float value) const
Computes RGB color color based on the palette and an intensity valuevalue which should be in the range [0.0, 1.0].
virtual void getColorInPaletteColorSpace (float * color, float value) const
Computes color coordinates color in this palette's color space for the given intensity valuevalue which should be in the range [0.0, 1.0].
const std::string & getName () const
Returns the palette's name.
bool getReverseFlag () const
Returns the reverse flag - whether the color palette is mirrored or not.
virtual PaletteType getType () const
Returns the type of the color palette.
std::string getTypeString (bool humanReadable=false) const
Returns the string representation of the color palette type.
virtual bool isEqual (const SBDPalette & other) const
Returns whether this palette is equal to other .
virtual bool isSerializable () const
Returns true __
bool operator!= (const SBDPalette & other) const
Inequality operator.
bool operator== (const SBDPalette & other) const
Equality operator.
virtual void serialize (SBCSerializer * serializer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber(1, 0, 0)) const
Serializes the document.
void setName (const std::string & name)
Sets the palette's name to name .
void setReverseFlag (bool b)
Sets the reverse flag - whether to mirror or not the color palette.
virtual std::string toPythonCode () const
Returns the string representation of the object that can be used to reconstruct it in Python.
virtual void unserialize (SBCSerializer * serializer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber(1, 0, 0))
Unserializes the document.
virtual ~SBDPalette ()
Destructor.

Public Static Functions inherited from SBDPalette#

See SBDPalette

Type Name
std::string getTypeString (PaletteType paletteType, bool humanReadable=false)
Returns the string representation of the color palette type paletteType .
float getValueAlongLinearTrajectory (float y1, float y2, float power, float x)
Returns a value along the "linear" trajectory.
float getValueAlongTriangularTrajectory (float y1, float ymax, float y2, float power, float x)
Returns a value along "triangular" trajectory.

Protected Attributes#

Type Name
int chroma1
The starting value for the chroma coordinate (corresponds to hue1 )
int chroma2
The center value for the chroma coordinate (corresponds to hue2 )
int chroma3
The end value for the chroma coordinate (corresponds to hue3 )
float chromaPower1
The power of the intensity value for the computation of the chroma coordinate in the first sequential palette, the power should be greater than 0.
float chromaPower2
The power of the intensity value for the computation of the chroma coordinate in the second sequential palette, the power should be greater than 0.
int hue1
The starting value for the hue coordinate.
int hue2
The center value for the hue coordinate.
int hue3
The end value for the first coordinate.
int luminance1
The starting value for the luminance coordinate (corresponds to hue1 )
int luminance2
The center value for the luminance coordinate (corresponds to hue2 )
int luminance3
The end value for the luminance coordinate (corresponds to hue3 )
float luminancePower1
The power of the intensity value for the computation of the luminance coordinate in the first sequential palette, the power should be greater than 0.
float luminancePower2
The power of the intensity value for the computation of the luminance coordinate in the second sequential palette, the power should be greater than 0.
int maximumChroma1
The max value for the chroma coordinate for the triangular trajectory in the first sequential palette.
int maximumChroma2
The max value for the chroma coordinate for the triangular trajectory in the second sequential palette.
float neutralPoint
The neutral point position, should be in the range [0.0, 1.0].

Protected Attributes inherited from SBDPalette#

See SBDPalette

Type Name
std::string * name
The palette's name.
bool reverseFlag
Reverse flag: if true, then the palette is reversed/mirrored.

Detailed Description#

A flexible diverging palette is constructed in a 3D color coordinate space with coordinates named Hue, Chroma, and Luminance. Flexible diverging HCL color palettes generated through combination of two fully flexible multi-hue sequential palettes.

Short name: SBPaletteFlexibleDivergingHCL

Public Functions Documentation#

function SBDPaletteFlexibleDivergingHCL [1/3]#

Default constructor.

SBDPaletteFlexibleDivergingHCL::SBDPaletteFlexibleDivergingHCL () 

Constructs a default flexible diverging HCL palette.

Initializes the palette with default name, hue, chroma, luminance, and neutral point values.


function SBDPaletteFlexibleDivergingHCL [2/3]#

Builds a flexible diverging HCL palette with the given parameters.

SBDPaletteFlexibleDivergingHCL::SBDPaletteFlexibleDivergingHCL (
    int hue1,
    int hue2,
    int hue3,
    int chroma1,
    int chroma2,
    int chroma3,
    int luminance1=70,
    int luminance2=70,
    int luminance3=70,
    float chromaPower1=1.0f,
    float luminancePower1=1.0f,
    float chromaPower2=1.0f,
    float luminancePower2=1.0f,
    int maximumChroma1=50,
    int maximumChroma2=50,
    float neutralPoint=0.5f,
    std::string name=std::string(""),
    bool reverse=false
) 

Constructs a flexible diverging HCL palette with the given parameters.

Parameters:

  • hue1 Starting hue value for the first coordinate.
  • hue2 Center hue value for the first coordinate.
  • hue3 Ending hue value for the first coordinate.
  • chroma1 Starting chroma value for the second coordinate.
  • chroma2 Center chroma value for the second coordinate.
  • chroma3 Ending chroma value for the second coordinate.
  • luminance1 Starting luminance value for the third coordinate.
  • luminance2 Center luminance value for the third coordinate.
  • luminance3 Ending luminance value for the third coordinate.
  • chromaPower1 Power applied to the chroma intensity for the first sequential palette (must be > 0).
  • luminancePower1 Power applied to the luminance intensity for the first sequential palette (must be > 0).
  • chromaPower2 Power applied to the chroma intensity for the second sequential palette (must be > 0).
  • luminancePower2 Power applied to the luminance intensity for the second sequential palette (must be > 0).
  • maximumChroma1 Maximum chroma value for the first sequential palette.
  • maximumChroma2 Maximum chroma value for the second sequential palette.
  • neutralPoint Position of the neutral point in the range [0.0, 1.0].
  • name Optional name for the palette.
  • reverse If true, the palette is reversed.

function SBDPaletteFlexibleDivergingHCL [3/3]#

Copy constructor.

SBDPaletteFlexibleDivergingHCL::SBDPaletteFlexibleDivergingHCL (
    const SBDPaletteFlexibleDivergingHCL & otherColorPalette
) 

Parameters:

  • otherColorPalette The palette to copy from.

function clone#

Clones the color palette.

virtual SBDPaletteFlexibleDivergingHCL * SBDPaletteFlexibleDivergingHCL::clone () override const

Creates a copy of the palette.

Returns:

A pointer to a new palette that is a copy of this one.

Implements SBDPalette::clone


function getChroma1#

Returns the starting value for the second coordinate.

int SBDPaletteFlexibleDivergingHCL::getChroma1 () const

Gets the starting chroma value.

Returns:

The chroma value for the first coordinate.


function getChroma2#

Returns the center value for the second coordinate.

int SBDPaletteFlexibleDivergingHCL::getChroma2 () const

Returns:

The center value for the second coordinate.


function getChroma3#

Returns the end value for the second coordinate.

int SBDPaletteFlexibleDivergingHCL::getChroma3 () const

Returns:

The end value for the second coordinate.


function getChromaPower1#

Returns the power of the intensity value for the computation of the second coordinate in the first sequential palette.

float SBDPaletteFlexibleDivergingHCL::getChromaPower1 () const

Returns:

Power of the intensity for the first sequential palette.


function getChromaPower2#

Returns the power of the intensity value for the computation of the second coordinate in the second sequential palette.

float SBDPaletteFlexibleDivergingHCL::getChromaPower2 () const

Returns:

Power of the intensity for the second sequential palette.


function getColor#

Computes sRGB color color based on this palette for the given intensity valuevalue which should be in the range [0.0, 1.0].

virtual void SBDPaletteFlexibleDivergingHCL::getColor (
    float * color,
    float value
) override const

Computes sRGB color based on this palette for the given intensity value.

Parameters:

  • color Output array for sRGB color (size at least 3).
  • value Intensity value in the range [0.0, 1.0].

Implements SBDPalette::getColor


function getColorInPaletteColorSpace#

Computes color coordinates color in this palette's color space for the given intensity valuevalue which should be in the range [0.0, 1.0].

virtual void SBDPaletteFlexibleDivergingHCL::getColorInPaletteColorSpace (
    float * color,
    float value
) override const

SBDPaletteFlexibleDivergingHCL::getColorInPaletteColorSpace - Computes color coordinates color in the HCL color space for the given intensity value value.

Parameters:

  • color - an array for color coordinates (with the size greater than or equal to 3) in the HCL color space.
  • value - an intensity value based on which the resulting color is computed, the intensity value should be in range [0.0, 1.0] where 1 corresponds to the full intensity.

Implements SBDPalette::getColorInPaletteColorSpace


function getHue1#

Returns the starting value for the first coordinate.

int SBDPaletteFlexibleDivergingHCL::getHue1 () const

Gets the starting hue value.

Returns:

The hue value for the first coordinate.


function getHue2#

Returns the center value for the first coordinate.

int SBDPaletteFlexibleDivergingHCL::getHue2 () const

Gets the center hue value.

Returns:

The hue value for the second coordinate.


function getHue3#

Returns the end value for the first coordinate.

int SBDPaletteFlexibleDivergingHCL::getHue3 () const

Gets the ending hue value.

Returns:

The hue value for the third coordinate.


function getLuminance1#

Returns the starting value for the third coordinate.

int SBDPaletteFlexibleDivergingHCL::getLuminance1 () const

Returns:

The starting luminance value.


function getLuminance2#

Returns the center value for the third coordinate.

int SBDPaletteFlexibleDivergingHCL::getLuminance2 () const

Returns:

The center luminance value.


function getLuminance3#

Returns the end value for the third coordinate.

int SBDPaletteFlexibleDivergingHCL::getLuminance3 () const

Returns:

The end luminance value.


function getLuminancePower1#

Returns the power of the intensity value for the computation of the third coordinate in the first sequential palette.

float SBDPaletteFlexibleDivergingHCL::getLuminancePower1 () const

Returns:

Power of the intensity for the first sequential palette.


function getLuminancePower2#

Returns the power of the intensity value for the computation of the third coordinate in the second sequential palette.

float SBDPaletteFlexibleDivergingHCL::getLuminancePower2 () const

Returns:

Power of the intensity for the second sequential palette.


function getMaximumChroma1#

Returns the max value for the second coordinate in the first sequential palette.

int SBDPaletteFlexibleDivergingHCL::getMaximumChroma1 () const

Returns:

Maximum chroma value for the first sequential palette.


function getMaximumChroma2#

Returns the max value for the second coordinate in the second sequential palette.

int SBDPaletteFlexibleDivergingHCL::getMaximumChroma2 () const

Returns:

Maximum chroma value for the second sequential palette.


function getNeutralPoint#

Returns the neutral point position.

float SBDPaletteFlexibleDivergingHCL::getNeutralPoint () const

Returns:

Neutral point position.


function getType#

Returns the type of the color palette.

virtual PaletteType SBDPaletteFlexibleDivergingHCL::getType () override const

Retrieves the type of the palette.

Returns:

The enumeration value representing a flexible diverging palette.

Implements SBDPalette::getType


function isEqual#

Returns whether this palette is equal to other .

virtual bool SBDPaletteFlexibleDivergingHCL::isEqual (
    const SBDPalette & other
) override const

Compares this palette with another for equality.

Parameters:

  • other The palette to compare against.

Returns:

true if the palettes have identical parameters; otherwise false.

Implements SBDPalette::isEqual


function isSerializable#

Returns true __

virtual bool SBDPaletteFlexibleDivergingHCL::isSerializable () override const

Indicates whether the palette can be serialized.

Returns:

true indicating the palette is serializable.

Implements SBDPalette::isSerializable


function serialize#

Serializes the palette.

virtual void SBDPaletteFlexibleDivergingHCL::serialize (
    SBCSerializer * serializer,
    const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER,
    const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0)
) override const

Writes the palette data to the provided serializer.

Parameters:

  • serializer The serializer to write to.
  • sdkVersionNumber The version of the SDK.
  • classVersionNumber The version of the class.

Implements SBDPalette::serialize


function setChroma#

Sets the parameters for the second coordinate.

void SBDPaletteFlexibleDivergingHCL::setChroma (
    int chroma1,
    int chroma2,
    int chroma3,
    int maximumChroma1,
    int maximumChroma2,
    float chromaPower1=1.0f,
    float chromaPower2=1.0f
) 

Parameters:

  • chroma1 Starting chroma value.
  • chroma2 Center chroma value.
  • chroma3 End chroma value.
  • maximumChroma1 Maximum chroma for the first sequential palette.
  • maximumChroma2 Maximum chroma for the second sequential palette.
  • chromaPower1 Power of the intensity for the first sequential palette.
  • chromaPower2 Power of the intensity for the second sequential palette.

function setChroma1#

Sets the starting value for the second coordinate.

void SBDPaletteFlexibleDivergingHCL::setChroma1 (
    int chroma
) 

Parameters:

  • chroma Starting chroma value.

function setChroma2#

Sets the center value for the second coordinate.

void SBDPaletteFlexibleDivergingHCL::setChroma2 (
    int chroma
) 

Parameters:

  • chroma Center chroma value.

function setChroma3#

Sets the end value for the second coordinate.

void SBDPaletteFlexibleDivergingHCL::setChroma3 (
    int chroma
) 

Parameters:

  • chroma End chroma value.

function setChromaPower1#

Sets the power of the intensity value for the computation of the second coordinate in the first sequential palette, the power should be greater than 0.

void SBDPaletteFlexibleDivergingHCL::setChromaPower1 (
    float chromaPower
) 

Sets the power of the intensity value for the computation of the second coordinate in the first sequential palette; the power should be greater than 0.

Parameters:

  • chromaPower Power of the intensity for the first sequential palette (must be > 0).

function setChromaPower2#

Sets the power of the intensity value for the computation of the second coordinate in the second sequential palette, the power should be greater than 0.

void SBDPaletteFlexibleDivergingHCL::setChromaPower2 (
    float chromaPower
) 

Sets the power of the intensity value for the computation of the second coordinate in the second sequential palette; the power should be greater than 0.

Parameters:

  • chromaPower Power of the intensity for the second sequential palette (must be > 0).

function setHue#

Sets the parameters for the first coordinate.

void SBDPaletteFlexibleDivergingHCL::setHue (
    int hue1,
    int hue2,
    int hue3
) 

Sets all three hue values.

Parameters:

  • hue1 Starting hue value for the first coordinate.
  • hue2 Center hue value for the second coordinate.
  • hue3 Ending hue value for the third coordinate.

function setHue1#

Sets the starting value for the first coordinate.

void SBDPaletteFlexibleDivergingHCL::setHue1 (
    int hue
) 

Sets the starting hue value.

Parameters:

  • hue The hue value to set for the first coordinate.

function setHue2#

Sets the center value for the first coordinate.

void SBDPaletteFlexibleDivergingHCL::setHue2 (
    int hue
) 

Sets the center hue value.

Parameters:

  • hue The hue value to set for the second coordinate.

function setHue3#

Sets the end value for the first coordinate.

void SBDPaletteFlexibleDivergingHCL::setHue3 (
    int hue
) 

Sets the ending hue value.

Parameters:

  • hue The hue value to set for the third coordinate.

function setLuminance#

Sets the parameters for the third coordinate.

void SBDPaletteFlexibleDivergingHCL::setLuminance (
    int luminance1,
    int luminance2,
    int luminance3,
    float luminancePower1=1.0f,
    float luminancePower2=1.0f
) 

Parameters:

  • luminance1 Starting luminance value.
  • luminance2 Center luminance value.
  • luminance3 End luminance value.
  • luminancePower1 Power of the intensity for the first sequential palette.
  • luminancePower2 Power of the intensity for the second sequential palette.

function setLuminance1#

Sets the starting value for the third coordinate.

void SBDPaletteFlexibleDivergingHCL::setLuminance1 (
    int luminance
) 

Parameters:

  • luminance Starting luminance value.

function setLuminance2#

Sets the center value for the third coordinate.

void SBDPaletteFlexibleDivergingHCL::setLuminance2 (
    int luminance
) 

Parameters:

  • luminance Center luminance value.

function setLuminance3#

Sets the end value for the third coordinate.

void SBDPaletteFlexibleDivergingHCL::setLuminance3 (
    int luminance
) 

Parameters:

  • luminance End luminance value.

function setLuminancePower1#

Sets the power of the intensity value for the computation of the third coordinate in the first sequential palette, the power should be greater than 0.

void SBDPaletteFlexibleDivergingHCL::setLuminancePower1 (
    float luminancePower
) 

Sets the power of the intensity value for the computation of the third coordinate in the first sequential palette; the power should be greater than 0.

Parameters:

  • luminancePower Power of the intensity for the first sequential palette (must be > 0).

function setLuminancePower2#

Sets the power of the intensity value for the computation of the third coordinate in the second sequential palette, the power should be greater than 0.

void SBDPaletteFlexibleDivergingHCL::setLuminancePower2 (
    float luminancePower
) 

Sets the power of the intensity value for the computation of the third coordinate in the second sequential palette; the power should be greater than 0.

Parameters:

  • luminancePower Power of the intensity for the second sequential palette (must be > 0).

function setMaximumChroma1#

Sets the max value for the second coordinate in the first sequential palette.

void SBDPaletteFlexibleDivergingHCL::setMaximumChroma1 (
    int maximumChroma
) 

Parameters:

  • maximumChroma Maximum chroma value for the first sequential palette.

function setMaximumChroma2#

Sets the max value for the second coordinate in the second sequential palette.

void SBDPaletteFlexibleDivergingHCL::setMaximumChroma2 (
    int maximumChroma
) 

Parameters:

  • maximumChroma Maximum chroma value for the second sequential palette.

function setNeutralPoint#

Sets the neutral point position, should be in the range [0.0, 1.0].

void SBDPaletteFlexibleDivergingHCL::setNeutralPoint (
    float neutralPoint
) 

Sets the neutral point position.

Parameters:

  • neutralPoint Neutral point position in the range [0.0, 1.0].

function toPythonCode#

Returns the string representation of the object that can be used to reconstruct it in Python.

virtual std::string SBDPaletteFlexibleDivergingHCL::toPythonCode () override const

Generates a Python representation of the palette.

Returns a string that can be used to reconstruct the palette in Python.

Returns:

A Python code string representing the palette.

Implements SBDPalette::toPythonCode


function unserialize#

Unserializes the palette.

virtual void SBDPaletteFlexibleDivergingHCL::unserialize (
    SBCSerializer * serializer,
    const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER,
    const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0)
) override

Reads the palette data from the provided serializer.

Parameters:

  • serializer The serializer to read from.
  • sdkVersionNumber The version of the SDK.
  • classVersionNumber The version of the class.

Implements SBDPalette::unserialize


function ~SBDPaletteFlexibleDivergingHCL#

Destructor.

virtual SBDPaletteFlexibleDivergingHCL::~SBDPaletteFlexibleDivergingHCL () 


Protected Attributes Documentation#

variable chroma1#

The starting value for the chroma coordinate (corresponds to hue1 )

int SBDPaletteFlexibleDivergingHCL::chroma1;


variable chroma2#

The center value for the chroma coordinate (corresponds to hue2 )

int SBDPaletteFlexibleDivergingHCL::chroma2;


variable chroma3#

The end value for the chroma coordinate (corresponds to hue3 )

int SBDPaletteFlexibleDivergingHCL::chroma3;


variable chromaPower1#

The power of the intensity value for the computation of the chroma coordinate in the first sequential palette, the power should be greater than 0.

float SBDPaletteFlexibleDivergingHCL::chromaPower1;


variable chromaPower2#

The power of the intensity value for the computation of the chroma coordinate in the second sequential palette, the power should be greater than 0.

float SBDPaletteFlexibleDivergingHCL::chromaPower2;


variable hue1#

The starting value for the hue coordinate.

int SBDPaletteFlexibleDivergingHCL::hue1;


variable hue2#

The center value for the hue coordinate.

int SBDPaletteFlexibleDivergingHCL::hue2;


variable hue3#

The end value for the first coordinate.

int SBDPaletteFlexibleDivergingHCL::hue3;


variable luminance1#

The starting value for the luminance coordinate (corresponds to hue1 )

int SBDPaletteFlexibleDivergingHCL::luminance1;


variable luminance2#

The center value for the luminance coordinate (corresponds to hue2 )

int SBDPaletteFlexibleDivergingHCL::luminance2;


variable luminance3#

The end value for the luminance coordinate (corresponds to hue3 )

int SBDPaletteFlexibleDivergingHCL::luminance3;


variable luminancePower1#

The power of the intensity value for the computation of the luminance coordinate in the first sequential palette, the power should be greater than 0.

float SBDPaletteFlexibleDivergingHCL::luminancePower1;


variable luminancePower2#

The power of the intensity value for the computation of the luminance coordinate in the second sequential palette, the power should be greater than 0.

float SBDPaletteFlexibleDivergingHCL::luminancePower2;


variable maximumChroma1#

The max value for the chroma coordinate for the triangular trajectory in the first sequential palette.

int SBDPaletteFlexibleDivergingHCL::maximumChroma1;


variable maximumChroma2#

The max value for the chroma coordinate for the triangular trajectory in the second sequential palette.

int SBDPaletteFlexibleDivergingHCL::maximumChroma2;


variable neutralPoint#

The neutral point position, should be in the range [0.0, 1.0].

float SBDPaletteFlexibleDivergingHCL::neutralPoint;