Calculating Color3.fromRGB doesn't return a proper value

I’m trying to interpolate color: more specifically the ColorShift_Top property of the Lighting service, but it doesn’t work properly. I followed everything that the script does and it should return a proper value, but it always returns (1, 0, 0).


the following calculation is from the green color of lines 14 and 15
image

For anyone interested to see more of what I’ve done you can feel free to download the place and see for yourself. It’s not really read-friendly and I’m sorry about this, but I’ll fix it once it goes over 150 lines or so.
Realistic Lighting Test v1.rbxl (34.8 KB)

Color3.fromRGB is basically

function Color3.fromRGB(r, g, b)
    return Color3.new(r / 255, g / 255, b / 255)
end

Meaning (1, 0, 0) is 255, 0, 0

P.S. Color3 already has lerp return start:lerp(goal, alpha)

1 Like