SBDColorPaletteQualitativeHCL Class Reference

The SBDColorPaletteQualitativeHCL class is a class for the qualitative HCL (Hue-Chroma-Luminance) color palette. More...

Constructors and destructors

 SBDColorPaletteQualitativeHCL ()
 Default constructor.
 
 SBDColorPaletteQualitativeHCL (int hue1, int hue2, int chroma=50, int luminance=70, std::string name=std::string(""))
 
 SBDColorPaletteQualitativeHCL (const SBDColorPaletteQualitativeHCL *const otherColorPalette)
 Copy constructor.
 
virtual ~SBDColorPaletteQualitativeHCL ()
 

Serialization

bool isSerializable () const
 Returns true.
 
virtual void serialize (SBCSerializer *serializer, const SBNodeIndexer &nodeIndexer, const SBVersionNumber &sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber &classVersionNumber=SBVersionNumber(1, 0, 0)) const
 Serializes the document.
 
virtual void unserialize (SBCSerializer *serializer, const SBNodeIndexer &nodeIndexer, const SBVersionNumber &sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber &classVersionNumber=SBVersionNumber(1, 0, 0))
 Unserializes the document.
 

Getter and setter functions

virtual SBDColorPaletteQualitativeHCLclone () const
 Clones the color palette.
 

Palette functions

void getColor (float *color, float value) const
 Computes sRGB color color based on this palette for the given intensity value value 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 value value which should be in the range [0.0, 1.0]. More...
 

Additional Inherited Members

- Public Types inherited from SBDColorPalette
enum  ColorPaletteType {
  Custom,
  Qualitative,
  Sequential,
  Diverging
}
 
- Public Member Functions inherited from SBDColorPaletteQualitative
 SBDColorPaletteQualitative ()
 Default constructor.
 
 SBDColorPaletteQualitative (int hue1, int hue2, int chroma=50, int luminance=70, std::string name=std::string(""))
 
 SBDColorPaletteQualitative (const SBDColorPaletteQualitative *const otherColorPalette)
 Copy constructor.
 
virtual ~SBDColorPaletteQualitative ()
 
bool isSerializable () const
 Returns true.
 
int getHue1 () const
 Returns the starting value for the first coordinate.
 
void setHue1 (int hue1)
 Sets the starting value for the first coordinate.
 
int getHue2 () const
 Returns the end value for the first coordinate.
 
void setHue2 (int hue2)
 Sets the end value for the first coordinate.
 
void setHue (int hue1, int hue2)
 Sets the parameters for the first coordinate.
 
int getChroma () const
 Returns the value for the second coordinate.
 
void setChroma (int chroma)
 Sets the value for the second coordinate.
 
int getLuminance () const
 Returns the value for the third coordinate.
 
void setLuminance (int luminance)
 Sets the value for the third coordinate.
 
- Public Member Functions inherited from SBDColorPalette
 SBDColorPalette ()
 Default constructor.
 
virtual ~SBDColorPalette ()
 
bool isSerializable () const
 Returns true.
 
ColorPaletteType getType () const
 Returns the type of the color palette.
 
void setType (SBDColorPalette::ColorPaletteType paletteType)
 Sets the type of the color palette.
 
const std::string & getName () const
 Returns the palette's name.
 
void setName (const std::string &name)
 Sets the palette's name to name.
 
- Protected Member Functions inherited from SBDColorPalette
float getValueAlongLinearTrajectory (float y1, float y2, float power, float x) const
 Returns a value along the "linear" trajectory. More...
 
float getValueAlongTriangularTrajectory (float y1, float ymax, float y2, float power, float x) const
 Returns a value along "triangular" trajectory. More...
 
- Protected Attributes inherited from SBDColorPaletteQualitative
int hue1
 The starting value for the first coordinate.
 
int hue2
 The end value for the first coordinate.
 
int chroma
 The value of the second coordinate.
 
int luminance
 The value of the third coordinate.
 
- Protected Attributes inherited from SBDColorPalette
ColorPaletteType paletteType
 Palette's type.
 
std::string * name
 Palette's name.
 

Detailed Description

A qualitative HCL palette is constructed in a 3D color coordinate space with coordinates named Hue, Chroma, and Luminance, where the coordinate Hue can have an arbitrary value, and coordinates Chroma and Luminance are constant: hue = hue1 + i * (hue2 - hue1) chroma = const luminance = const where i is a value (of intensity or interestingness) based on which the colorization should be done.

Member Function Documentation

◆ getColorInPaletteColorSpace()

void SBDColorPaletteQualitativeHCL::getColorInPaletteColorSpace ( float *  color,
float &  value 
) const
virtual

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

Parameters
color- an array for color coordinates (float[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.

Reimplemented from SBDColorPaletteQualitative.