What is Roblox's RGB Shift for Neon?

Roblox changes its RGB value when you have a neon part, as can be shown by these 2 pictures below.


The second picture is in studio whereas the first picture is in Blender.

I’m trying to replicate the neon colouring of studio, I’ve attempted it by using information from this thread.

I reversed the function above resulting in this.


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

function revertNeonTransform(color)

color = color * 1.35
color = color^2 
color = color^2 
color = color / 0.25
color = math.sqrt(color)

return color
end

However, this gives an incorrect result

Would anyone have any idea on how to achieve a more color correct change or what math would be need to used ?

1 Like

This works for inverting apparently, but not for reverting.

Bump!!! Any help is appreciated!

Bump again!!!

editing again i didnt get the revert but try if u want

I believe you can also use color /= color and color ^= 2 etc to clean up the code.

it is still the same as the revert code but i think i get the idea, might be involving saving the neon colors

local colorSaves = {}

function invertNeonTransform(color)
	local recentCSN = nil
	table.insert(colorSaves, {})
	
	recentCSN = #colorSaves
	table.insert(colorSaves[recentCSN], color)
	
	color ^= 2
	color *= 0.25
	color = math.sqrt(color)
	color = math.sqrt(color)
	color /= 1.35

	table.insert(colorSaves[recentCSN], color)
	return color
end

function revertNeonTransform(color)
	for _, v in pairs(colorSaves) do
		if table.find(v, color) then
			local revertedColor = v[1]
			return revertedColor
		end
	end
end

if one value in a table of colorSaves is different, the other value will be different, all tables will not have the same value if all of them has 1 slightly different value in it

Have you seen this post?

If not it may contain what you need to know.

This only works if you know the previous one, I’m attempting to find the colour shift from the engine so I can apply it to blender.

Even more bumping, any help would be nice

Bumping this, having the same issue