colorSpaceToWorking
Correctly converts an input color from its source color space (usually sRGB) to Three.js's working color space (Linear) for physically-based lighting calculations.
Core Advantages
Ensures physically correct rendering by abstracting complex color science, resulting in more realistic and vibrant visuals while preventing dim, color-distorted images.
Common Uses
Processing color textures (Albedo/Diffuse Maps) by converting them from sRGB to Linear space.
Calibrating sRGB color values from user interfaces (e.g., color pickers).
Converting vertex colors imported from 3D modeling software.
How to adjust
This is not a parameter for artistic adjustment, but a crucial switch between 'correct' and 'incorrect' rendering. Not using it results in a dim, low-contrast, and lifeless image. Using it correctly produces a bright, vibrant, and physically plausible scene with natural light transitions.
Code Examples
1// Convert an sRGB texture to the working color space
2material.colorNode = colorSpaceToWorking( myTextureNode, THREE.SRGBColorSpace );