How do i get each individual rgb value from a color3 code?

Essentially this is what i want to do:

I want to get the 3 numbers from a single Color3 code (Something like: 255, 255, 255) and put them into 3 different variables, So for example it would get Color3.new(255,155,55) and split it into 3 variables, One with the value of red (255), one with the value of green (155) & one with the value of blue (55).

Any help would be appreciated.

1 Like

local Color3 = Color3.fromRGB(255, 155, 55)
local R = Color3.R
local G = Color3.G
local B = Color3.B

I did fromRGB because new only works with 0 - 1 not up to 255

this should work with any color3 type including Color3.new