libhomegear-base  0.7
Base library for Homegear and Homegear family modules.
BaseLib::Color Class Reference

#include <Color.h>

Classes

class  HSV
 Class defining a HSV color. More...
 
class  NormalizedRGB
 Class defining a RGB color with intensity values for each color between 0 and 1. More...
 
class  RGB
 Class defining a RGB color with intensity values for each color between 0 and 255. More...
 

Public Member Functions

virtual ~Color ()
 Destructor. More...
 

Static Public Member Functions

static void getConversionMatrix (const Math::Triangle &gamut, Math::Matrix3x3 &conversionMatrix, Math::Matrix3x3 &inversedConversionMatrix)
 Gets the RGB to XYZ and XYZ to RGB conversion matrix for the specified chromaticity coordinates of an RGB system with D65 as reference white. More...
 
static void rgbToCie1931Xy (const NormalizedRGB &rgb, const Math::Matrix3x3 &conversionMatrix, const double &gamma, Math::Point2D &xy, double &brightness)
 Converts a RGB value to it's CIE 1931 color space chromaticity coordinates (x, y). More...
 
static void cie1931XyToRgb (const Math::Point2D &xy, const double &brightness, const Math::Matrix3x3 &conversionMatrix, const double &gamma, NormalizedRGB &rgb)
 Converts CIE 1931 color space chromaticity coordinates (x, y) to RGB as reference white. More...
 

Protected Member Functions

 Color ()
 Constructor. More...
 

Constructor & Destructor Documentation

§ ~Color()

BaseLib::Color::~Color ( )
virtual

Destructor.

Does nothing.

§ Color()

BaseLib::Color::Color ( )
protected

Constructor.

It is protected, because the class only contains static methods. It does nothing.

Member Function Documentation

§ cie1931XyToRgb()

void BaseLib::Color::cie1931XyToRgb ( const Math::Point2D xy,
const double &  brightness,
const Math::Matrix3x3 conversionMatrix,
const double &  gamma,
NormalizedRGB rgb 
)
static

Converts CIE 1931 color space chromaticity coordinates (x, y) to RGB as reference white.

See also
iOS Philips hue SDK
Some Common RGB Working Space Matrices
RGB Working Space Information
Parameters
[in]xyCoordinate in CIE 1931 color space.
[in]brightnessThe brightness between 0 and 1.
[in]conversionMatrixThe XYZ to RGB conversion matrix.
[in]gammaThe gamma of the RGB color space.
[out]rgbThe resulting normalized RGB intensities.

§ getConversionMatrix()

void BaseLib::Color::getConversionMatrix ( const Math::Triangle gamut,
Math::Matrix3x3 conversionMatrix,
Math::Matrix3x3 inversedConversionMatrix 
)
static

Gets the RGB to XYZ and XYZ to RGB conversion matrix for the specified chromaticity coordinates of an RGB system with D65 as reference white.

See also
RGB/XYZ Matrices
A Review of RGB Color Spaces
Parameters
[in]gamutThe chromaticity coordinates of an RGB system to get the conversion matrix for. First point is the coordinate for red, the second point for green and the third point for blue.
[out]conversionMatrixThe RGB to XYZ conversion matrix.
[out]inversedConversionMatrixThe XYZ to RGB conversion matrix.

§ rgbToCie1931Xy()

void BaseLib::Color::rgbToCie1931Xy ( const NormalizedRGB rgb,
const Math::Matrix3x3 conversionMatrix,
const double &  gamma,
Math::Point2D xy,
double &  brightness 
)
static

Converts a RGB value to it's CIE 1931 color space chromaticity coordinates (x, y).

See also
iOS Philips hue SDK
Some Common RGB Working Space Matrices
RGB Working Space Information
Parameters
[in]rgbNormalized RGB intensities.
[in]conversionMatrixThe RGB to XYZ conversion matrix.
[in]gammaThe gamma of the RGB color space.
[out]xyCoordinate in CIE 1931 color space.
[out]brightnessThe brightness between 0 and 1.

The documentation for this class was generated from the following files: