Ad
Log in to vote
1

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

Asked by 1 month 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 75 — 1mo

Hi.

Looks like you're using an ad blocker.

That's fine...

No, it really is.

Just, I mean, we put a lot of work into this site, you know?

It would be really really appreciated if you would turn off your ad blocker for our website...

We tried really hard to make our ads as unobtrusive as possible.

If you really hate ads, would you consider a $2 donation via Patreon?

Here's the link.

We love you. We hope you love us too.

.

..

...

Now back to your regularly scheduled Scripting Helpers....

...

..

.

1 answer

Log in to vote
4
Answered by
CootKitty 284
1 month 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 58 — 1mo
Ad

Answer this question



Ad