BrickColor
Overview
A data type that is a collection of predefined color names. Unlike Color3, which specifies the RGB values directly, this data type can select and use preset color names.
The BrickColor.new function can be used to specify the name of a desired color, conveniently setting the BrickColor property of a part.
Refer to the table below for the list of colors included in BrickColor.
Constructors
new
Creates a BrickColor object corresponding to the provided name.
Parameters
string val
The name of the BrickColor to create.
Return
BrickColor
The created BrickColor.
Code Samples
local BrickColor = BrickColor.new("Bright red")Properties
b
number
A value representing the Blue ratio of BrickColor in the RGB color system. 0 means the intensity of Blue is very low, and 1 means the intensity of Blue is very high.
Code Samples
Color
Color3
The color value in Color3, based on the RGB of actually displayed BrickColor.
Code Samples
g
number
A value representing the Green ratio of BrickColor in the RGB color system. 0 means the intensity of Green is very low, and 1 means the intensity of Green is very high.
Code Samples
Name
string
A name given to BrickColor. This value is used internally to identify or refer to a specific color.
Code Samples
Number
number
A unique identifier given to BrickColor. This value is used internally to identify or refer to a specific color.
Code Samples
r
number
A value representing the Red ratio of BrickColor in the RGB color system. 0 means the intensity of Red is very low, and 1 means the intensity of Red is very high.
Code Samples
Methods
Events
See also
Last updated