ColorManagement
Manages the working color space and conversions between color spaces.
Like three.js, this holds mutable global state (enabled, workingColorSpace, spaces) and is not thread-safe.
Only sRGB and linear sRGB are registered. three.js's renderer helpers, such as getToneMappingMode, are not included.
Properties
Implementations of supported color spaces, keyed by ColorSpace. Mirrors three.js's ColorManagement.spaces.
The working color space. Colors store their components in this space.
Functions
Converts color from sourceColorSpace to the workingColorSpace.
Converts the given color from sourceColorSpace to targetColorSpace, mutating and returning it. Returns the color unchanged when color management is disabled, the spaces match, or either space is ColorSpace.NoColorSpace.
Registers (or overrides) the given colorSpaces into spaces. Corresponds to three.js's ColorManagement.define().
Deprecated alias for workingToColorSpace (renamed in three.js r177).
Writes the luminance coefficients of the given colorSpace into target.
Copies spaces[sourceColorSpace].toXYZ into targetMatrix and multiplies it by spaces[targetColorSpace].fromXYZ, producing the source->target RGB transform.
Returns the primaries (chromaticity coordinates) of the given colorSpace.
Returns the transfer function of the given colorSpace. Returns ColorTransfer.Linear for ColorSpace.NoColorSpace.
Deprecated alias for colorSpaceToWorking (renamed in three.js r177).
Converts color from the workingColorSpace to targetColorSpace.