Loading...
Searching...
No Matches
hueplusplus::ColorGamut Struct Reference

Triangle of representable colors in CIE. More...

`#include <hueplusplus/ColorUnits.h>`

Collaboration diagram for hueplusplus::ColorGamut:
[legend]

## Public Member Functions

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

## Public Attributes

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

## 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:

- include/hueplusplus/ColorUnits.h
- src/ColorUnits.cpp