Color3
From Goodblox Wiki
Jump to navigationJump to search
Color3 is a data type used to store the numeric values of a certain colour. It appears in the format (R;G;B); where R is the red component (from 0-1), G is the green component (from 0-1) and B is the blue component (from 0-1).
Examples:
Color3.new(1, 0, 0)
Color3.new(0, 1, 0)
Color3.new(0, 0, 1)
If you want to use R/G/B from 0-255 instead of 0-1, then you have to divide each value by 255. You can make a function like this:
local function color(r, g, b) return Color3.new(r/255, g/255, b/255) end
color(255, 0, 0)