Node for setting render colour, regardless of lighting [Blender 2.78a] 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). 


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).


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.
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.

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.

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.