hueplusplus  1.0.0
Public Member Functions | Public Attributes | List of all members
hueplusplus::ColorGamut Struct Reference

Triangle of representable colors in CIE. More...

#include <hueplusplus/ColorUnits.h>

+ Collaboration diagram for hueplusplus::ColorGamut:

Public Member Functions

bool contains (const XY &xy) const
 Check whether xy is representable. More...
 
XY corrected (const XY &xy) const
 Correct xy to closest representable color. More...
 

Public Attributes

XY redCorner
 Red corner in the color triangle. More...
 
XY greenCorner
 Green corner in the color triangle. More...
 
XY blueCorner
 Blue corner in the color triangle. More...
 

Detailed Description

Triangle of representable colors in CIE.

Note
Red, green and blue corner are oriented counter clockwise.
See also
https://en.wikipedia.org/wiki/Chromaticity

Member Function Documentation

◆ contains()

bool hueplusplus::ColorGamut::contains ( const XY xy) const

Check whether xy is representable.

◆ corrected()

XY hueplusplus::ColorGamut::corrected ( const XY xy) const

Correct xy to closest representable color.

Returns
xy if it is in the triangle, otherwise the closest point on the border.

Member Data Documentation

◆ blueCorner

XY hueplusplus::ColorGamut::blueCorner

Blue corner in the color triangle.

◆ greenCorner

XY hueplusplus::ColorGamut::greenCorner

Green corner in the color triangle.

◆ redCorner

XY hueplusplus::ColorGamut::redCorner

Red corner in the color triangle.


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