Neon displaying inaccurate color

Reproduction steps:

Expected behavior:
Displaying the actual colors of both neon bricks

Actual behavior:
Displaying the same neon color for orange and yellow, by putting the threshold on 4 you can see that even clearer.

This bug is persistent with a few other colors too.

Issue Area: Engine
Impact: Low
Frequency: Constant

This is most likely not a problem for most experiences but in the experience I am working on, displaying the correct colors is crucial. This is something that is preventing the release of my experience.

Reference article: How to get a part and UI to reflect the exact RGB color
Relevant articles:
Issue with lighting for BillboardGuis/SurfaceGuis
Option to exclude objects from global lighting

Repro file:
repro.rbxl (34.1 KB)

4 Likes

This has happened to me before as well, and it’s not too bad but definitely confusing.

1 Like

I can’t check the video (it’s not loading) but neon is supposed to be brighter than other materials.
If that’s what you mean, then it’s not a bug

3 Likes

i believe the colors have always been “rounded” to the nearest brickcolor?

neon has always been weird.

3 Likes

I would focus on this bug rather than the neon one.

Anyways, if you can provide an image showing the issue (other than a region blocked video) that would be nice.

thats weird the video loads for me, also it is not “brighter” than other materials but rather displays an inaccurate color. you can see this when bloom is turned off.


These videos loaded. I can see the issue, but I think this has been here for a while.

Try adjusting your lighting settings like brightness, ColorShift, and Ambient, to see if the color changes.

Hello!

This is by design. Neon colors are modified when rendered to preserve the color as much as possible when they pass through bloom → they start to glow. This means that if you modify bloom to actually not do anything (disable the glow) you see those modified colors. We tried to make it so that these colors are still similar to the original colors set, but there is a balance. Neon is designed to show correct (maybe more like correct-ish to be honest) color when glowing primarily.

You can use neon with bloom threshold set to 4 if you want, but we cannot guarantee that it will preserve colors.

If you want exact unlit color could you use surface guis?

If you don’t want to use surface guis:
I wrote an inverse function that changes color in a way that it stays the same when processed using neon. Feel free to use it.
But be sure that this is a hack and I do not recommend using it as there is definitely no guarantee that this will work in the future :slight_smile:

image

code:

function invertNeonTransform(color)
	color = color * 0.25
	color = math.sqrt(color)
	color = math.sqrt(color)
	color = color / 1.35
	
	return color
end

--usage
part.Color = Color3.new(invertNeonTransform(part.Color.R), invertNeonTransform(part.Color.G), invertNeonTransform(part.Color.B))
8 Likes

Would be great if this behavior along with the tip about surfaceguis were documented on the Creator Docs. It’s very possible that many developers don’t and will never know about this behavior of neon

1 Like

Thanks for the clarity, the thing is that with bloom on or off the colors are still not preserved. Some colors do display accurate colors and some others do not. Regardless I respect the design choice but it should definitely be documented.

EDIT:
sadly the color hack that you provided doesn’t work regardless of bloom
image
image

Right! I went through the shaders and forgot to do the srgb->linear conversion. Following code should work. I verified on couple colors.

It will not and cannot be exactly 1:1 because last pass of rendering is a tonemapping. Our tone mapping is designed to not to change colors much, but it still could shift colors slightly.

Still reminder. We do not guarantee that this code to translate color will work in the future and this kind of a hack. But if you want to use it, feel free :slight_smile:

Good luck with your game!

function invertNeonTransform(color)
    color = color * color
	color = color * 0.25
	color = math.sqrt(color)
	color = math.sqrt(color)
	color = color / 1.35
	
	return color
end

--usage
part.Color = Color3.new(invertNeonTransform(part.Color.R), invertNeonTransform(part.Color.G), invertNeonTransform(part.Color.B))
3 Likes

Still didn’t seem to be accurate for any color to me. I guess I will just have to stick to combability lighting. Thanks regardless :slight_smile:

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.