Core 1.0
Xyz Class Reference

Color in the CIE XYZ color space (illuminant D65). More...

#include <color.h>

Public Member Functions

 Xyz (const double &, const double &, const double &)
 Create a color in XYZ space.
 Xyz (const Color &)
 Create a color in XYZ space from an input RGB color.
Color ToColor () const
 Convert to RGB space.

Protected Attributes

double z = 0.0
 Color xyz coefficients.

Friends

class Lab

Detailed Description

Color in the CIE XYZ color space (illuminant D65).

Color in XYZ space.

XYZ is a linear, device-independent color space defined by the CIE 1931 standard. The Y component represents luminance. Components are normalized so that Y=1 for the D65 white point. Values may exceed [0,1] for colors outside the sRGB gamut; use ToColor() to convert back to sRGB with clamping.

Constructor & Destructor Documentation

◆ Xyz() [1/2]

Xyz::Xyz ( const double & x,
const double & y,
const double & z )
explicit

Create a color in XYZ space.

Parameters
x,y,zComponents.

◆ Xyz() [2/2]

Xyz::Xyz ( const Color & c)
explicit

Create a color in XYZ space from an input RGB color.

Parameters
cColor.