I'm aware of Node for setting render colour, regardless of lighting, and tried following it. However, the output color seems quite off from the input color.

For example, load the default scene that opens on blender. I disabled the light. All other settings are the default for cycles in Blender 2.78a in Windows.

Set the shader to output (0.5,0.2,1.0) or (128,51,255). Nodes renderer

After rendering, however, the output color is quite off from what I'd expect. Instead of the desired (128,51,255), the output is (188,124,255). Result image

I suppose there's quite a lot going on under the hood in cycles. However, I wanted to use cycles in my own research project, with a custom OSL script defining the final mesh color without any disturbances.

With the prior discussion in mind, is there something I'm missing here? Is there a way to get the exact input-output using cycles?

Thank you for your time and attention.


2 Answers 2


When you save the final image to disk, Blender applies the nonlinear sRGB gamma correction curve. Internally Blender works with a linear color model, which in general is also true for the color picker.

If you want your final image to have certain color values you have the option to apply gamma correction to the color that you pick by adding a Gamma node with the value 2.2, which is a close approximation to the non-constant sRGB gamma value. In this case this would lead to RGB values of 128, 48, 255 in the final image.

gamma node

Alternatively, instead of adding the gamma node you can enter the desired colors in hex format as Blender's color picker does compensate gamma correction in hex mode. For this particular color this would be 8033FF. The color values in the final image here would be RGB 128, 51, 255 as originally intended. But if you later decide to use colors not expressible in hex format you would have to make trade-offs there.

color picker in hex mode

If it's necessary to exactly match some values then I assume you would have to calculate the RGB values yourself by using the formula mentioned in the sRGB Wikipedia article.

  • $\begingroup$ That was a very thorough reply, thank you very much. $\endgroup$ Commented Jan 23, 2017 at 22:49

I can't thank binweg enough for pointing me to the right direction, I didn't know about the automatic sRGB color conversion in Blender.

In case anyone has the same problem as me, the sRGB color conversion in the final rendering can be disabled by setting render View to raw in Properties Editor ‣ Scene ‣ Color Management, as stated in the Blender manual.

enter image description here

That way the final rendered color is the exact color desired in linear space. enter image description here

  • 1
    $\begingroup$ This will mess up all colors that are NOT using this method. I would strongly advise against disabling color management unless you know ALL the possible ramifications for your scene. $\endgroup$
    – JtheNinja
    Commented Jan 24, 2017 at 3:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .