Color Temperature Mode allows us to set the colors of the lights in the scene with Kelvin values instead of RGB values. For example White is 6500 Kelvin according to the D65 standard. Candle light is 1800 Kelvin.
Using color temperatures is a more convenient way to set realistic light colors so here is how to do it!
How-to
Somehow the settings to enable color temperature mode are hidden at the time of writing. So here are the steps to make them visible and enable them:
- Open Project Settings > Graphics
- Enable Debug Mode in Inspector
- Check Lights Use Linear Intensity
- Check Lights Use Color Temperature
- Disable Debug Mode in Inspector
- Select a light in the scene or create a new one
- Check Use color temperature mode
- Repeat for each light you want to use with color temperature mode
Issues with Baking / Lightmapping
Unfortunately the Lightmapper seems to ignore the color temperatures on the lights when baking by the time of writing. So when you would like to use baked or mixed lighting you can not use the Kelvin values. Instead you can use the normal filter value of the light to change its color. Therefore I created a set of color swatches with the help of the Kelvin to RGB calculator from Academo.org. It includes the following colors:
Kelvin | Red | Green | Blue | Hex |
1500 | 255 | 108 | 0 | #FF6C00 |
3200 | 255 | 184 | 123 | #FFB87B |
4000 | 255 | 206 | 166 | #FFCEA6 |
5600 | 255 | 239 | 225 | #FFEFE1 |
6500 | 255 | 254 | 250 | #FFFEFA |
8000 | 221 | 230 | 255 | #DDE6FF |
10000 | 202 | 218 | 255 | #CADAFF |
12000 | 191 | 211 | 255 | #BFD3FF |
15000 | 181 | 205 | 255 | #B5CDFF |
You can download the set here. Follow these steps to install the set:
- Open a color window in Unity
- Under Swatches click the option icon
- Select Reveal Current Library Location
- Extract the ZIP-file to that location
- In Unity open the color window again
- Click the option icon again under Swatches
- Select the new entry Temperature Colors
Of course you can use these swatches also without using color temperature mode at all. In that case you could skip the whole activation process from the beginning and just set the light colors directly with the swatches. But it might be necessary to switch on Lights Use Linear Intensity in the Graphics settings anyway. I am not sure about that.
If you know more about that topic or if there is something I can improve, please let me know in the comments!
I cannot find a way to enable Debug for Project Settings > Graphics. For me in unity 2021.3.4f1 there is no option to enable debugging for the Graphics window. I’m using URP 12.7. Is this option only available for the old built-in render pipeline?
Hi Chris, you can enable Debug mode for the Inspector by right clicking on the Inspector tab, but I’m not sure if that still works with newer versions of Unity and URP. The post is quite old.