the title says it all!

thanks if anyone can help

multiply the value by 255 to get the rgb value

still is giving me mixed numbers, worrks mostly but i still get decimals with massive numbers

The easy solution is - as suggested - to literally just multiply by 255. Decimals in the resulting numbers are due to floating point imprecisions so just round the numbers with `math.round()`

or something.

If you don’t want to round numbers for some reason you can also use this complex solution, but I don’t recommend it:

```
local c = Color3.fromRGB(176, 20, 209)
for component in c:ToHex():gmatch("..") do
print(tonumber(component, 16))
end
```

This prints:

176

20

209

1 Like

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