Ad
Log in to vote
1

How do I convert a Color3 Value to a RGB Value?

Asked by 11 months ago

So, let's say I would want to get the Red value from a Part. I would use this code:

print(game.Workspace.TestPart.Color.r)

And it would output a number like "0.1234321" or something like that.... But how would I make it so that it prints out a RGB value from 0 - 255 instead of a Color3 Value 0 - 1?

0
Do you mean BrickColor to RGB value? Mineloxer 125 — 11mo

1 answer

Log in to vote
4
Answered by
CootKitty 301 Moderation Voter
11 months ago

Just multiply the value by 255.

print(game.Workspace.TestPart.Color.r*255)
0
Oh wow, didn't think of that... Thank's! MRbraveDragon 117 — 11mo
Ad

Answer this question