Enum rbx_types::BrickColor[][src]

#[repr(u16)]
#[non_exhaustive]
pub enum BrickColor {
Show 208 variants White, Grey, LightYellow, BrickYellow, LightGreenMint, LightReddishViolet, PastelBlue, LightOrangeBrown, Nougat, BrightRed, MedReddishViolet, BrightBlue, BrightYellow, EarthOrange, Black, DarkGrey, DarkGreen, MediumGreen, LigYellowichOrange, BrightGreen, DarkOrange, LightBluishViolet, Transparent, TrRed, TrLgBlue, TrBlue, TrYellow, LightBlue, TrFluReddishOrange, TrGreen, TrFluGreen, PhosphWhite, LightRed, MediumRed, MediumBlue, LightGrey, BrightViolet, BrYellowishOrange, BrightOrange, BrightBluishGreen, EarthYellow, BrightBluishViolet, TrBrown, MediumBluishViolet, TrMediReddishViolet, MedYellowishGreen, MedBluishGreen, LightBluishGreen, BrYellowishGreen, LigYellowishGreen, MedYellowishOrange, BrReddishOrange, BrightReddishViolet, LightOrange, TrBrightBluishViolet, Gold, DarkNougat, Silver, NeonOrange, NeonGreen, SandBlue, SandViolet, MediumOrange, SandYellow, EarthBlue, EarthGreen, TrFluBlue, SandBlueMetallic, SandVioletMetallic, SandYellowMetallic, DarkGreyMetallic, BlackMetallic, LightGreyMetallic, SandGreen, SandRed, DarkRed, TrFluYellow, TrFluRed, GunMetallic, RedFlipFlop, YellowFlipFlop, SilverFlipFlop, Curry, FireYellow, FlameYellowishOrange, ReddishBrown, FlameReddishOrange, MediumStoneGrey, RoyalBlue, DarkRoyalBlue, BrightReddishLilac, DarkStoneGrey, LemonMetalic, LightStoneGrey, DarkCurry, FadedGreen, Turquoise, LightRoyalBlue, MediumRoyalBlue, Rust, Brown, ReddishLilac, Lilac2, LightLilac, BrightPurple, LightPurple, LightPink, LightBrickYellow, WarmYellowishOrange, CoolYellow, DoveBlue, MediumLilac, SlimeGreen, SmokyGrey, DarkBlue, ParsleyGreen, SteelBlue, StormBlue, Lapis, DarkIndigo, SeaGreen, Shamrock, Fossil, Mulberry, ForestGreen, CadetBlue, ElectricBlue, Eggplant, Moss, Artichoke, SageGreen, GhostGrey, Lilac, Plum, Olivine, LaurelGreen, QuillGrey, Crimson, Mint, BabyBlue, CarnationPink, Persimmon, Maroon, Gold2, DaisyOrange, Pearl, Fog, Salmon, TerraCotta, Cocoa, Wheat, Buttermilk, Mauve, Sunrise, Tawny, Rust2, Cashmere, Khaki, LilyWhite, Seashell, Burgundy, Cork, Burlap, Beige, Oyster, PineCone, FawnBrown, HurricaneGrey, CloudyGrey, Linen, Copper, DirtBrown, Bronze, Flint, DarkTaupe, BurntSienna, InstitutionalWhite, MidGray, ReallyBlack, ReallyRed, DeepOrange, Alder, DustyRose, Olive, NewYeller, ReallyBlue, NavyBlue, DeepBlue, Cyan, CGABrown, Magenta, Pink, DeepOrange2, Teal, Toothpaste, LimeGreen, Camo, Grime, Lavender, PastelLightBlue, PastelOrange, PastelViolet, PastelBlueGreen, PastelGreen, PastelYellow, PastelBrown, RoyalPurple, HotPink,
}
Expand description

BrickColor values were the old, palette-based system of defining colors in Roblox. As of the time of writing, they’re still used for some old systems like SpawnLocation and Team objects.

Parts no longer use BrickColor, but we have conversions here to support older models.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
White
Grey
LightYellow
BrickYellow
LightGreenMint
LightReddishViolet
PastelBlue
LightOrangeBrown
Nougat
BrightRed
MedReddishViolet
BrightBlue
BrightYellow
EarthOrange
Black
DarkGrey
DarkGreen
MediumGreen
LigYellowichOrange
BrightGreen
DarkOrange
LightBluishViolet
Transparent
TrRed
TrLgBlue
TrBlue
TrYellow
LightBlue
TrFluReddishOrange
TrGreen
TrFluGreen
PhosphWhite
LightRed
MediumRed
MediumBlue
LightGrey
BrightViolet
BrYellowishOrange
BrightOrange
BrightBluishGreen
EarthYellow
BrightBluishViolet
TrBrown
MediumBluishViolet
TrMediReddishViolet
MedYellowishGreen
MedBluishGreen
LightBluishGreen
BrYellowishGreen
LigYellowishGreen
MedYellowishOrange
BrReddishOrange
BrightReddishViolet
LightOrange
TrBrightBluishViolet
Gold
DarkNougat
Silver
NeonOrange
NeonGreen
SandBlue
SandViolet
MediumOrange
SandYellow
EarthBlue
EarthGreen
TrFluBlue
SandBlueMetallic
SandVioletMetallic
SandYellowMetallic
DarkGreyMetallic
BlackMetallic
LightGreyMetallic
SandGreen
SandRed
DarkRed
TrFluYellow
TrFluRed
GunMetallic
RedFlipFlop
YellowFlipFlop
SilverFlipFlop
Curry
FireYellow
FlameYellowishOrange
ReddishBrown
FlameReddishOrange
MediumStoneGrey
RoyalBlue
DarkRoyalBlue
BrightReddishLilac
DarkStoneGrey
LemonMetalic
LightStoneGrey
DarkCurry
FadedGreen
Turquoise
LightRoyalBlue
MediumRoyalBlue
Rust
Brown
ReddishLilac
Lilac2
LightLilac
BrightPurple
LightPurple
LightPink
LightBrickYellow
WarmYellowishOrange
CoolYellow
DoveBlue
MediumLilac
SlimeGreen
SmokyGrey
DarkBlue
ParsleyGreen
SteelBlue
StormBlue
Lapis
DarkIndigo
SeaGreen
Shamrock
Fossil
Mulberry
ForestGreen
CadetBlue
ElectricBlue
Eggplant
Moss
Artichoke
SageGreen
GhostGrey
Lilac
Plum
Olivine
LaurelGreen
QuillGrey
Crimson
Mint
BabyBlue
CarnationPink
Persimmon
Maroon
Gold2
DaisyOrange
Pearl
Fog
Salmon
TerraCotta
Cocoa
Wheat
Buttermilk
Mauve
Sunrise
Tawny
Rust2
Cashmere
Khaki
LilyWhite
Seashell
Burgundy
Cork
Burlap
Beige
Oyster
PineCone
FawnBrown
HurricaneGrey
CloudyGrey
Linen
Copper
DirtBrown
Bronze
Flint
DarkTaupe
BurntSienna
InstitutionalWhite
MidGray
ReallyBlack
ReallyRed
DeepOrange
Alder
DustyRose
Olive
NewYeller
ReallyBlue
NavyBlue
DeepBlue
Cyan
CGABrown
Magenta
Pink
DeepOrange2
Teal
Toothpaste
LimeGreen
Camo
Grime
Lavender
PastelLightBlue
PastelOrange
PastelViolet
PastelBlueGreen
PastelGreen
PastelYellow
PastelBrown
RoyalPurple
HotPink

Implementations

Find the first BrickColor with the given name, if it exists.

Note that some colors (Lilac, Rust, Gold, and Deep orange) have name collisions and can only have one of their variants constructed from this function.

This is roughly equivalent to BrickColor.new(string) from within Roblox, except unknown values will yield None instead of Medium stone grey.

Finds the BrickColor from its associated value. This is different from a BrickColor’s palette number, which not all colors have.

This is roughly equivalent to BrickColor.new(number) from within Roblox, except unknown values will yield None instead of Medium stone grey.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.