Color

object Color

Utilities to manipulate and convert colors. RGB colors are 3 floats, RGBA colors 4; results are new arrays. sRGB conversions are the accurate ones (C++'s default ColorConversion::ACCURATE).

Functions

Link copied to clipboard

Computes the Beer-Lambert absorption coefficients that turn white light into color at distance, for the absorption parameter of materials that use refraction.

Link copied to clipboard

Converts a correlated color temperature, in kelvin within 1,000K..15,000K, to a linear sRGB color.

Link copied to clipboard

Converts a CIE standard illuminant series D, in kelvin within 4,000K..25,000K, to a linear sRGB color.

Link copied to clipboard

Converts an sRGB color, RGB or RGBA (alpha left unmodified), to linear space.

Converts an RGB color to linear space; the conversion depends on type.

Converts an RGBA color to linear space; the conversion depends on type.

Link copied to clipboard

Converts a linear color, RGB or RGBA (alpha left unmodified), to sRGB space.