UMG is doing some weird color adjustment in text widgets and possibly others. If I set a widget’s color to (.5, .5, .5) I expect it to be #7f7f7f, but it renders as #bcbcbc.
How do I either disable this adjustment or correct for it with my own math?
So, I’m setting this in Blueprint from a vector with the linear values in it - The vector is (0.5, 0.5, 0.5) and I expect it to come out as #7f7f7f. I set this in a blueprint using the Vector to LinearColor node and use that to make a SlateColor, and it still gets brightened in the end result. So how do I either disable this adjustment or correct for it?
[EDIT] This is the blueprint:
I didn’t see any functions related to sRGB or linear colors. Do I just need to write the conversion math myself since UE4 can’t even do that?
The engine has sRGB conversion functions, they are not exposed to blueprints. You can write some simple blueprint library functions to expose them. Slate doesn’t render the final color in linear space - the final color we render is in Gamma space.
If you want to simply go between Gamma and Linear colors easier, you can use FColor, which may or may not be exposed to blueprints, but that’s the classic RGBA8 gamma space color structure in the engine.
Not seeing FColor anywhere but it got it working-ish: To correct for the linear->sRGB conversion I can take Power(Color, 2.19). It’s not exact as some people in other threads have claimed, but it’s close enough for my purposes.