#[non_exhaustive]
#[repr(u16)]
pub enum BrickColor {
Show 208 variants White = 1, Grey = 2, LightYellow = 3, BrickYellow = 5, LightGreenMint = 6, LightReddishViolet = 9, PastelBlue = 11, LightOrangeBrown = 12, Nougat = 18, BrightRed = 21, MedReddishViolet = 22, BrightBlue = 23, BrightYellow = 24, EarthOrange = 25, Black = 26, DarkGrey = 27, DarkGreen = 28, MediumGreen = 29, LigYellowichOrange = 36, BrightGreen = 37, DarkOrange = 38, LightBluishViolet = 39, Transparent = 40, TrRed = 41, TrLgBlue = 42, TrBlue = 43, TrYellow = 44, LightBlue = 45, TrFluReddishOrange = 47, TrGreen = 48, TrFluGreen = 49, PhosphWhite = 50, LightRed = 100, MediumRed = 101, MediumBlue = 102, LightGrey = 103, BrightViolet = 104, BrYellowishOrange = 105, BrightOrange = 106, BrightBluishGreen = 107, EarthYellow = 108, BrightBluishViolet = 110, TrBrown = 111, MediumBluishViolet = 112, TrMediReddishViolet = 113, MedYellowishGreen = 115, MedBluishGreen = 116, LightBluishGreen = 118, BrYellowishGreen = 119, LigYellowishGreen = 120, MedYellowishOrange = 121, BrReddishOrange = 123, BrightReddishViolet = 124, LightOrange = 125, TrBrightBluishViolet = 126, Gold = 127, DarkNougat = 128, Silver = 131, NeonOrange = 133, NeonGreen = 134, SandBlue = 135, SandViolet = 136, MediumOrange = 137, SandYellow = 138, EarthBlue = 140, EarthGreen = 141, TrFluBlue = 143, SandBlueMetallic = 145, SandVioletMetallic = 146, SandYellowMetallic = 147, DarkGreyMetallic = 148, BlackMetallic = 149, LightGreyMetallic = 150, SandGreen = 151, SandRed = 153, DarkRed = 154, TrFluYellow = 157, TrFluRed = 158, GunMetallic = 168, RedFlipFlop = 176, YellowFlipFlop = 178, SilverFlipFlop = 179, Curry = 180, FireYellow = 190, FlameYellowishOrange = 191, ReddishBrown = 192, FlameReddishOrange = 193, MediumStoneGrey = 194, RoyalBlue = 195, DarkRoyalBlue = 196, BrightReddishLilac = 198, DarkStoneGrey = 199, LemonMetalic = 200, LightStoneGrey = 208, DarkCurry = 209, FadedGreen = 210, Turquoise = 211, LightRoyalBlue = 212, MediumRoyalBlue = 213, Rust = 216, Brown = 217, ReddishLilac = 218, Lilac2 = 219, LightLilac = 220, BrightPurple = 221, LightPurple = 222, LightPink = 223, LightBrickYellow = 224, WarmYellowishOrange = 225, CoolYellow = 226, DoveBlue = 232, MediumLilac = 268, SlimeGreen = 301, SmokyGrey = 302, DarkBlue = 303, ParsleyGreen = 304, SteelBlue = 305, StormBlue = 306, Lapis = 307, DarkIndigo = 308, SeaGreen = 309, Shamrock = 310, Fossil = 311, Mulberry = 312, ForestGreen = 313, CadetBlue = 314, ElectricBlue = 315, Eggplant = 316, Moss = 317, Artichoke = 318, SageGreen = 319, GhostGrey = 320, Lilac = 321, Plum = 322, Olivine = 323, LaurelGreen = 324, QuillGrey = 325, Crimson = 327, Mint = 328, BabyBlue = 329, CarnationPink = 330, Persimmon = 331, Maroon = 332, Gold2 = 333, DaisyOrange = 334, Pearl = 335, Fog = 336, Salmon = 337, TerraCotta = 338, Cocoa = 339, Wheat = 340, Buttermilk = 341, Mauve = 342, Sunrise = 343, Tawny = 344, Rust2 = 345, Cashmere = 346, Khaki = 347, LilyWhite = 348, Seashell = 349, Burgundy = 350, Cork = 351, Burlap = 352, Beige = 353, Oyster = 354, PineCone = 355, FawnBrown = 356, HurricaneGrey = 357, CloudyGrey = 358, Linen = 359, Copper = 360, DirtBrown = 361, Bronze = 362, Flint = 363, DarkTaupe = 364, BurntSienna = 365, InstitutionalWhite = 1_001, MidGray = 1_002, ReallyBlack = 1_003, ReallyRed = 1_004, DeepOrange = 1_005, Alder = 1_006, DustyRose = 1_007, Olive = 1_008, NewYeller = 1_009, ReallyBlue = 1_010, NavyBlue = 1_011, DeepBlue = 1_012, Cyan = 1_013, CGABrown = 1_014, Magenta = 1_015, Pink = 1_016, DeepOrange2 = 1_017, Teal = 1_018, Toothpaste = 1_019, LimeGreen = 1_020, Camo = 1_021, Grime = 1_022, Lavender = 1_023, PastelLightBlue = 1_024, PastelOrange = 1_025, PastelViolet = 1_026, PastelBlueGreen = 1_027, PastelGreen = 1_028, PastelYellow = 1_029, PastelBrown = 1_030, RoyalPurple = 1_031, HotPink = 1_032,
}
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 = 1

§

Grey = 2

§

LightYellow = 3

§

BrickYellow = 5

§

LightGreenMint = 6

§

LightReddishViolet = 9

§

PastelBlue = 11

§

LightOrangeBrown = 12

§

Nougat = 18

§

BrightRed = 21

§

MedReddishViolet = 22

§

BrightBlue = 23

§

BrightYellow = 24

§

EarthOrange = 25

§

Black = 26

§

DarkGrey = 27

§

DarkGreen = 28

§

MediumGreen = 29

§

LigYellowichOrange = 36

§

BrightGreen = 37

§

DarkOrange = 38

§

LightBluishViolet = 39

§

Transparent = 40

§

TrRed = 41

§

TrLgBlue = 42

§

TrBlue = 43

§

TrYellow = 44

§

LightBlue = 45

§

TrFluReddishOrange = 47

§

TrGreen = 48

§

TrFluGreen = 49

§

PhosphWhite = 50

§

LightRed = 100

§

MediumRed = 101

§

MediumBlue = 102

§

LightGrey = 103

§

BrightViolet = 104

§

BrYellowishOrange = 105

§

BrightOrange = 106

§

BrightBluishGreen = 107

§

EarthYellow = 108

§

BrightBluishViolet = 110

§

TrBrown = 111

§

MediumBluishViolet = 112

§

TrMediReddishViolet = 113

§

MedYellowishGreen = 115

§

MedBluishGreen = 116

§

LightBluishGreen = 118

§

BrYellowishGreen = 119

§

LigYellowishGreen = 120

§

MedYellowishOrange = 121

§

BrReddishOrange = 123

§

BrightReddishViolet = 124

§

LightOrange = 125

§

TrBrightBluishViolet = 126

§

Gold = 127

§

DarkNougat = 128

§

Silver = 131

§

NeonOrange = 133

§

NeonGreen = 134

§

SandBlue = 135

§

SandViolet = 136

§

MediumOrange = 137

§

SandYellow = 138

§

EarthBlue = 140

§

EarthGreen = 141

§

TrFluBlue = 143

§

SandBlueMetallic = 145

§

SandVioletMetallic = 146

§

SandYellowMetallic = 147

§

DarkGreyMetallic = 148

§

BlackMetallic = 149

§

LightGreyMetallic = 150

§

SandGreen = 151

§

SandRed = 153

§

DarkRed = 154

§

TrFluYellow = 157

§

TrFluRed = 158

§

GunMetallic = 168

§

RedFlipFlop = 176

§

YellowFlipFlop = 178

§

SilverFlipFlop = 179

§

Curry = 180

§

FireYellow = 190

§

FlameYellowishOrange = 191

§

ReddishBrown = 192

§

FlameReddishOrange = 193

§

MediumStoneGrey = 194

§

RoyalBlue = 195

§

DarkRoyalBlue = 196

§

BrightReddishLilac = 198

§

DarkStoneGrey = 199

§

LemonMetalic = 200

§

LightStoneGrey = 208

§

DarkCurry = 209

§

FadedGreen = 210

§

Turquoise = 211

§

LightRoyalBlue = 212

§

MediumRoyalBlue = 213

§

Rust = 216

§

Brown = 217

§

ReddishLilac = 218

§

Lilac2 = 219

§

LightLilac = 220

§

BrightPurple = 221

§

LightPurple = 222

§

LightPink = 223

§

LightBrickYellow = 224

§

WarmYellowishOrange = 225

§

CoolYellow = 226

§

DoveBlue = 232

§

MediumLilac = 268

§

SlimeGreen = 301

§

SmokyGrey = 302

§

DarkBlue = 303

§

ParsleyGreen = 304

§

SteelBlue = 305

§

StormBlue = 306

§

Lapis = 307

§

DarkIndigo = 308

§

SeaGreen = 309

§

Shamrock = 310

§

Fossil = 311

§

Mulberry = 312

§

ForestGreen = 313

§

CadetBlue = 314

§

ElectricBlue = 315

§

Eggplant = 316

§

Moss = 317

§

Artichoke = 318

§

SageGreen = 319

§

GhostGrey = 320

§

Lilac = 321

§

Plum = 322

§

Olivine = 323

§

LaurelGreen = 324

§

QuillGrey = 325

§

Crimson = 327

§

Mint = 328

§

BabyBlue = 329

§

CarnationPink = 330

§

Persimmon = 331

§

Maroon = 332

§

Gold2 = 333

§

DaisyOrange = 334

§

Pearl = 335

§

Fog = 336

§

Salmon = 337

§

TerraCotta = 338

§

Cocoa = 339

§

Wheat = 340

§

Buttermilk = 341

§

Mauve = 342

§

Sunrise = 343

§

Tawny = 344

§

Rust2 = 345

§

Cashmere = 346

§

Khaki = 347

§

LilyWhite = 348

§

Seashell = 349

§

Burgundy = 350

§

Cork = 351

§

Burlap = 352

§

Beige = 353

§

Oyster = 354

§

PineCone = 355

§

FawnBrown = 356

§

HurricaneGrey = 357

§

CloudyGrey = 358

§

Linen = 359

§

Copper = 360

§

DirtBrown = 361

§

Bronze = 362

§

Flint = 363

§

DarkTaupe = 364

§

BurntSienna = 365

§

InstitutionalWhite = 1_001

§

MidGray = 1_002

§

ReallyBlack = 1_003

§

ReallyRed = 1_004

§

DeepOrange = 1_005

§

Alder = 1_006

§

DustyRose = 1_007

§

Olive = 1_008

§

NewYeller = 1_009

§

ReallyBlue = 1_010

§

NavyBlue = 1_011

§

DeepBlue = 1_012

§

Cyan = 1_013

§

CGABrown = 1_014

§

Magenta = 1_015

§

Pink = 1_016

§

DeepOrange2 = 1_017

§

Teal = 1_018

§

Toothpaste = 1_019

§

LimeGreen = 1_020

§

Camo = 1_021

§

Grime = 1_022

§

Lavender = 1_023

§

PastelLightBlue = 1_024

§

PastelOrange = 1_025

§

PastelViolet = 1_026

§

PastelBlueGreen = 1_027

§

PastelGreen = 1_028

§

PastelYellow = 1_029

§

PastelBrown = 1_030

§

RoyalPurple = 1_031

§

HotPink = 1_032

Implementations§

source§

impl BrickColor

source

pub fn from_name(name: &str) -> Option<BrickColor>

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.

source

pub fn from_number(value: u16) -> Option<BrickColor>

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.

source

pub fn to_color3uint8(&self) -> Color3uint8

Trait Implementations§

source§

impl Clone for BrickColor

source§

fn clone(&self) -> BrickColor

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BrickColor

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for BrickColor

source§

fn fmt(&self, writer: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<BrickColor> for Variant

source§

fn from(value: BrickColor) -> Self

Converts to this type from the input type.
source§

impl PartialEq for BrickColor

source§

fn eq(&self, other: &BrickColor) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for BrickColor

source§

impl Eq for BrickColor

source§

impl StructuralEq for BrickColor

source§

impl StructuralPartialEq for BrickColor

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V