We use cookies on this site to enhance your user experience
Collapse Sidebar

BrickColor

BrickColor

BrickColor is a datatype that provides a predefined list of colors. In the past, you could only set the color of a Part to one of the available BrickColors, but they have since been expanded to support any color through the Part’s BasePart/Color property. Nowadays, the BrickColor datatype just serves as a handy palette of common Roblox part colors!

If you would like to see a full list of available BrickColors, check out the BrickColor Codes article!

Constructors

BrickColor.new ( number val )

Constructs a BrickColor from its numerical index.

BrickColor.new ( number r, number g, number b )

Constructs the closest BrickColor that can be matched to the specified RGB components.

BrickColor.new ( string val )

Constructs a BrickColor from its name.

BrickColor.new ( Color3 color )

Constructs the closest BrickColor that can be matched to the specified Color3.

BrickColor.palette ( number paletteValue )

Constructs a BrickColor from its palette index.

BrickColor.random ( )

Returns a random BrickColor.

BrickColor.White ( )

Returns the BrickColor White

BrickColor.Gray ( )

Returns the BrickColor Medium stone grey

BrickColor.DarkGray ( )

Returns the BrickColor Dark stone grey

BrickColor.Black ( )

Returns the BrickColor Black

BrickColor.Red ( )

Returns the BrickColor Bright Red

BrickColor.Yellow ( )

Returns the BrickColor Bright Yellow

BrickColor.Green ( )

Returns the BrickColor Dark Green

BrickColor.Blue ( )

Returns the BrickColor Bright Blue

Properties

number BrickColor.Number

The unique number that identifies the BrickColor

number BrickColor.r

The red component (between 0 and 1)

number BrickColor.g

The green component (between 0 and 1)

number BrickColor.b

The blue component (between 0 and 1)

string BrickColor.Name

The name associated with the BrickColor

Color3 BrickColor.Color

The Color3 associated with the BrickColor