Different color ouput when using Linear Color set temprature node


I’m making a Blueprint with which I want to convert a color in Kelvin towards a Linear RGB color. When I use the node (Linear color set Temperature) to convert the Kelvin value towards the Linear RGB value and use the new color as an input for the light color I get a completely different result compared to when I set the temperature manually within the light myself.
Any tips or insights on how to get the colors matching up?

Thanks in advance.


Are we talking about shaders as in material editor or actual blueprint code?

Hi Elias,

Actual Blueprint Code. I want to change the color of a light using RGB values but input the Kevlin Temp as a float. Doing some transformations on the color in between and in order to be able to do this transformation I need to be in the RGB values instead of the Kelvin range.

I see!

You can modify Temperature of a light, so naturally that means it can be done through blueprints as well:

Simply create a reference to the light and set the temperature:

Thnx for getting back so quickly.

I’m aware that I can set the temperature of the light that way. But I want to do some calculations on the light color with the temperature as an input rather than an output. In order to change the input temperature float, I used the Linear Color set Temprature node, but the generated color by this node does not align with the color output when comparing the a light with the temprature set to 3200 Klevin compared to a light set to the same value but using an RGB value instead.
The color generated looks alright in the variable of the blueprint:

But the value of the light looks totally different:

It seems to have something to do with the calculated value with the R channel being higher then one.

See here also attached the blueprint:

1 Like

@EliasWick Do you know why the color is looking different from the example I posted above?

Hey there. This thread is relatively old, but for those who still struggle with this, here’s the solution. You need to convert resulting color into vector, Normalize it, and then convert it back to the Linear Color.