gfm.image.cie

This module performs various color computation and conversions.

Members

Aliases

SpectralDistribution
alias SpectralDistribution = Vector!(float, 107u)

A spectral distribution of actual energy, from 360 to 780 nm, by 5 nm increments.

SpectralReflectance
alias SpectralReflectance = Vector!(float, 107u)

Spectral reflectance values. Can only be converted to a SpectralDistribution when lit with a ReferenceWhite. from 300 to 780 nm, by 5 nm increments Reflectances are parameterized by a ReferenceWhite.

Enums

RGBSpace
enum RGBSpace

Define various RGB spaces, which all have a reference white, a power curve and primary xyY coordinates.

ReferenceWhite
enum ReferenceWhite
Undocumented in source.

Functions

XYZToLinearRGB
deprecated vec3f XYZToLinearRGB(vec3f xyz)

Converts XYZ to linear RGB.

XYZToSpectralColor
deprecated SpectralReflectance XYZToSpectralColor(vec3f XYZ)

Converts from such a XYZ space back to spectral reflectance. Both spaces being parameterized by the same Illuminant.

linearRGBToXYZ
deprecated vec3f linearRGBToXYZ(vec3f rgb)

Converts linear RGB to XYZ.

spectralToXYZColor
deprecated vec3f spectralToXYZColor(SpectralReflectance c, ReferenceWhite illuminant)

Converts spectral color into a XYZ space (parameterized by an illuminant)

toCompandedRGB
deprecated vec3f toCompandedRGB(vec3f compandedRGB)

Converts from uncompanded RGB to companded RGB. Input and output should be in the [0..1] range.

toLinearRGB
deprecated vec3f toLinearRGB(vec3f compandedRGB)

Converts from companded RGB to uncompanded RGB. Input and output should be in the [0..1] range.

Bugs

Invalid assumptions are made about the XYZ space. It is actually not dependent on some RGB space. Warning: <b>This module is alpha-quality and scheduled for deprecation. You probably didn't need it anyway.</b>.

See Also

Meta