Pixel Inspector vs Color Picker | sRGB Conversion

I’m seeing discrepancy between the values that Color Picker returns when sampling a material in the Base Color Buffer View and what Pixel Inspector reports for Base Color. It was a long round-about way to land where I did and we’ve figured out how to work past the issue, but I wouldn’t mind some clarity on what I’m seeing here.

Background: We’re using a tinting method of dividing out an original color and multiplying in the new color. So if we have a red shirt we can divide the base color by red and multiply by blue and we’ll get a blue shirt. Presumably, then, if we divide and multiply by the same color we’d end up with the exact original, but we were seeing some discrepancies and traced it all down to the color picker. When we color-picked a value from the Buffer View Base Color to use as our divide color we got inaccurate results, but when we used Pixel Inspector and input the values we had the exact results we expected.

So I set up this little test:

[Image Removed]

When I put a Material Instance of this Material onto a mesh and previewed it with Base Color Buffer Vizualization Mode, I expected to be able to color-pick Sampled Albedo, then set Color Original / Sampled to 1 and see no difference in the two, but there was a difference.

The color picker gave me these RGB values: (0.03434, 0.015209, 0.012983).

But Pixel Inspector gave me these RGB values: (0.030713, 0.01096, 0.009134) - the exact values of Original Albedo (in our setup we are using textures in a more complicated material, so we can’t just look at the RGB values and plug them in like in this example).

If I manually entered the Pixel Inspector values into Sampled Albedo, then swapped Color Original / Sampled between 0 and 1, there was no visual difference (because they were the same color values).

Here’s the interesting thing…

Original Albedo is in sRGB, and its corresponding linear values are: (0.2039, 0.1294, 0.1176).

Using the conventional formula for sRGB conversion L = ((S+0.055)/1.055)^2.4 gives the color picked RGB values (0.03434, 0.015209, 0.012983).

Using the widely-accepted approximation conversion L = S^2.2 gives the Pixel Inspector values (0.030713, 0.01096, 0.009134).

It’s surprising to me that the approximation values are being used at all, but what’s more surprising is that those are the ones that I need to use in order for our tinting to work correctly. If anything, I would have expected the other way around.

I’m not exactly sure what my question here is, other than I guess…

Why are Pixel Inspector and Color Picker using different sRGB conversion methods, and is there a way to have them use the same?

Thanks!

Steps to Reproduce
Make a new, basic UE project in 5.6.

Make this simple Material:

[Image Removed]

Make a Material Instance.

Edit any Static Mesh and apply the Material Instance to the Mesh.

In the preview window, set the lighting to Buffer Visualization -> Base Color.

Edit the Material Instance.

Use the Color Picker to set the value of Sampled Albedo to the base color that is being displayed on the mesh.

Change Color Original / Sampled to 1.

Notice the color change of the mesh.

This is much more evident on darker colors than lighter colors.

Hello,

Apologies for the delay. Unfortunately, our different render paths are inconsistent. When rendering visualization modes we run without post-processing and fall back to DisplayGamma instead of sRGB, but when post-processing is enabled, we use sRGB. We want to make the visualization modes more consistent and having the visualizations modes where they are in regard to post-processing is something we hope to improve.

Thanks for the response. Are there any ideas about when these might come online?

Hello,

The work is still in the planning stages and we don’t have a target release yet.