Basically I have a game where I need to check the color of an object. I tried a bunch of things, but weirdly the value was always wrong.

First, to make sure everything was working, I tried this.

print(tostring((Color3.new(script.Parent.Ocean.Color.R,script.Parent.Ocean.Color.G,script.Parent.Ocean.Color.B))))

This outputted the value '0.72549, 0.768627, 0.694118' while the real value was sage green (I forgot the exact RGB numbers.)

So then I thought to try to convert this value to RGB because it seemed to be in HSV.

print(tostring((Color3.fromRGB(script.Parent.Ocean.Color.R,script.Parent.Ocean.Color.G,script.Parent.Ocean.Color.B))))

This outputted '0.000415225, 0.000645905, 0.000815071'. Bizarre.

Then I tried fromHSV instead of fromRGB, which gave me a value the same as the first one. Note that I have to do all this in code because the color value is random.

The solution to this problem might be obvious, but please help, this does not make sense.

Happy Holidays! :D

1 comment

0

Nevermind, I can use epic math to solve my problem