I’m working on a color block game where all the blocks disappear and 1 color gets chosen to remain, the issue I’m having is that when I try tweening a block to a certain color for e.g. Color3.fromRGB(20, 20, 20) some part colors change and the ones that don’t change have color values such as 20,19,20 or 19,19,20 etc, when it should be 20, 20, 20. I have not yet found any solutions or leads
Getting the color goal for the tween, for example Color3.fromRGB(20,20,20)
Tweening the color of the block to the given color (Color3.fromRGB(20, 20, 20)
Ultimately, I believe this is an issue with how computers handle math. It’s an interesting topic, I recommend giving this video a watch if you’re interested.
Getting back on topic though, even if you used Color3.fromRGB, Color3 values are converted to a decimal value from 0 to 1. 0 being black, 1 being white. The issue is that roblox displays Color3 values in the explorer as the 0-255 RGB format. And since you need to approximate these values, there can be rounding inconsistencies. Ultimately, shouldn’t be a major problem, even if you’re comparing two Color3 values. It’s just a minor display difference.
it indeed is an interesting topic and quite challenging to deal with for me at least, I changed the color3 exactly to what it should be when the tween is completed, it works fine now. thank you