Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you return the background color of a frame?

I want to get the RGB of the background color of a frame. How do I do so?

This is my script:

print(Frame.BackgroundColor3)

3 comments

0

What's the problem?

0

I want to be able to print the RYB values, like (20, 140, 25)

0

You already are

1 answer

✓ Accepted answer

I was checking my gui scripts to see if i could reproduce your problem, and after thinking a bit i found out that BackgroundColor3 returns a value that is 255 times lower than it should be in RGB. In order to fix that, we multiply the values by 255 and you get the RGB value, as shown below:

print(Frame.BackgroundColor3.R, Frame.BackgroundColor3.G, Frame.BackgroundColor3.B)

If this was useful, please accept my answer.

This discussion is preserved as it was. New answers, comments, and votes are closed.