#include <color.h>
Public Member Functions | |
ColorSystem (float xR, float yR, float xG, float yG, float xB, float yB, float xW, float yW, float lum=1.) | |
RGBColor | Convert (XYZColor &color) const |
bool | Constrain (const XYZColor &xyz, RGBColor &rgb) const |
Protected Attributes | |
float | xRed |
float | yRed |
Red coordinates. | |
float | xGreen |
float | yGreen |
Green coordinates. | |
float | xBlue |
float | yBlue |
Blue coordinates. | |
float | xWhite |
float | yWhite |
White coordinates. | |
float | luminance |
White intensity. | |
float | conversion [3][3] |
Corresponding conversion matrix from XYZ to RGB. |
Definition at line 270 of file color.h.
lux::ColorSystem::ColorSystem | ( | float | xR, | |
float | yR, | |||
float | xG, | |||
float | yG, | |||
float | xB, | |||
float | yB, | |||
float | xW, | |||
float | yW, | |||
float | lum = 1. | |||
) |
[in] | xR | x value of red in xyY space |
[in] | yR | y value of red in xyY space |
[in] | xG | x value of green in xyY space |
[in] | yG | y value of green in xyY space |
[in] | xB | x value of blue in xyY space |
[in] | yB | y value of blue in xyY space |
[in] | xW | x value of white in xyY space |
[in] | yW | y value of white in xyY space |
[in] | lum | Y (intensity) value of white in xyY space |
Definition at line 100 of file color.cpp.
References conversion, lux::dot(), lux::inverse(), luminance, cimg_library::matrix(), lux::multiply(), xBlue, xGreen, xRed, xWhite, yBlue, yGreen, yRed, and yWhite.
[in] | xyz | The color in XYZ space |
[in,out] | rgb | The same color in RGB space |
true | The color has been modified | |
false | The color was inside the representable gamut: no modification occured |
Definition at line 167 of file color.cpp.
References lux::Color::c, lux::InsideGamut(), Lerp(), and luminance.
[in] | color | A color in XYZ space |
Definition at line 287 of file color.h.
References lux::Color::c, and conversion.
float lux::ColorSystem::conversion[3][3] [protected] |
Corresponding conversion matrix from XYZ to RGB.
Definition at line 301 of file color.h.
Referenced by ColorSystem(), and Convert().
float lux::ColorSystem::luminance [protected] |
White intensity.
Definition at line 300 of file color.h.
Referenced by ColorSystem(), and Constrain().
float lux::ColorSystem::xBlue [protected] |
float lux::ColorSystem::xGreen [protected] |
float lux::ColorSystem::xRed [protected] |
float lux::ColorSystem::xWhite [protected] |
float lux::ColorSystem::yBlue [protected] |
float lux::ColorSystem::yGreen [protected] |
float lux::ColorSystem::yRed [protected] |
float lux::ColorSystem::yWhite [protected] |