< Scripting | Data Types

A real-valued RGB color tuple, with elements ranging from [0,1]. The Color3 data type is often used in setting the colors of objects that aren't related to bricks, such as GUIs, Sparkles, etc.


[edit] Constructors

Constructor Description Creates a new Color3 for black (0,0,0)., g, b) Creates a new Color3.

[edit] Properties

Property Type Description
Color3.r Number The red value
Color3.g Number The green value
Color3.b Number The blue value

[edit] Useful Code

Color3 values only range from 0 to 1. Many people prefer to use a system with a range of 255 instead of a range of one. Here is a useful piece of code:

function Color(r, g, b)
	return, g/255, b/255)

[edit] Converting BrickColor in to Color3

You can easily convert your BrickColor into Color3 format by simply doing something like this!

local brickcolor ="Really red") --Create our new BrickColor
local color = brickcolor.Color --BrickColors have a Color property that returns their Color3

[edit] See Also