Color

Enum Color 

Source
#[repr(u32)]
pub enum Color {
Show 32 variants BloodRed = 6_684_672, CrimsonRed = 10_027_008, BostonUniversityRed = 13_369_344, PersianRed = 13_382_451, DarkPink = 15_355_016, CrayolaViolet = 10_040_217, RebeccaPurple = 6_697_881, BluePigment = 3_355_545, TrueBlue = 26_316, RichElectricBlue = 39_372, SeaSerpent = 6_737_100, RybGreen = 7_851_059, Avocado = 6_723_840, MetallicGreen = 3_368_448, BronzeYellow = 6_710_784, DarkYellow = 10_066_176, Pear = 13_421_619, Yellow = 16_776_960, Sunglow = 16_763_955, VividGamboge = 16_750_848, Orange = 16_737_792, MediumVermilion = 13_395_507, Coconut = 10_053_171, PhilippineBronze = 6_697_728, Black = 0, SpanishGray = 10_066_329, LightSteelBlue = 11_255_002, CarnationPink = 16_625_095, CookiesAndCream = 15_194_289, ChineseSilver = 13_421_772, White = 16_777_215, Arsenic = 4_342_099,
}
Expand description

Colors you can filter by.

Color names found thanks to color-name.com.

This enum’s value is just hex, so you can get the R, G, B values with the following calculations:

  • let r = (val & 0xFF0000) >> 16
  • let g = (val & 0x00FF00) >> 8
  • let b = (val & 0x0000FF) >> 0

This cannot be customized further as only values allowed by wallhaven can be used.

Variants§

§

BloodRed = 6_684_672

Color with hex code 0x660000

§

CrimsonRed = 10_027_008

Color with hex code 0x990000

§

BostonUniversityRed = 13_369_344

Color with hex code 0xcc0000

§

PersianRed = 13_382_451

Color with hex code 0xcc3333

§

DarkPink = 15_355_016

Color with hex code 0xea4c88

§

CrayolaViolet = 10_040_217

Color with hex code 0x993399

§

RebeccaPurple = 6_697_881

Color with hex code 0x663399

§

BluePigment = 3_355_545

Color with hex code 0x333399

§

TrueBlue = 26_316

Color with hex code 0x0066cc

§

RichElectricBlue = 39_372

Color with hex code 0x0099cc

§

SeaSerpent = 6_737_100

Color with hex code 0x66cccc

§

RybGreen = 7_851_059

Color with hex code 0x77cc33

§

Avocado = 6_723_840

Color with hex code 0x669900

§

MetallicGreen = 3_368_448

Color with hex code 0x336600

§

BronzeYellow = 6_710_784

Color with hex code 0x666600

§

DarkYellow = 10_066_176

Color with hex code 0x999900

§

Pear = 13_421_619

Color with hex code 0xcccc33

§

Yellow = 16_776_960

Color with hex code 0xffff00

§

Sunglow = 16_763_955

Color with hex code 0xffcc33

§

VividGamboge = 16_750_848

Color with hex code 0xff9900

§

Orange = 16_737_792

Color with hex code 0xff6600

§

MediumVermilion = 13_395_507

Color with hex code 0xcc6633

§

Coconut = 10_053_171

Color with hex code 0x996633

§

PhilippineBronze = 6_697_728

Color with hex code 0x663300

§

Black = 0

Color with hex code 0x000000

§

SpanishGray = 10_066_329

Color with hex code 0x999999

§

LightSteelBlue = 11_255_002

Color with hex code 0xABBCDA

§

CarnationPink = 16_625_095

Color with hex code 0xFDADC7

§

CookiesAndCream = 15_194_289

Color with hex code 0xE7D8B1

§

ChineseSilver = 13_421_772

Color with hex code 0xcccccc

§

White = 16_777_215

Color with hex code 0xffffff

§

Arsenic = 4_342_099

Color with hex code 0x424153

Trait Implementations§

Source§

impl Clone for Color

Source§

fn clone(&self) -> Color

Returns a duplicate 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 Color

Source§

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

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

impl Display for Color

Source§

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

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

impl FromStr for Color

Source§

type Err = ColorParseError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl TryFrom<u32> for Color

Source§

type Error = TryFromPrimitiveError<Color>

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

fn try_from(number: u32) -> Result<Self, TryFromPrimitiveError<Self>>

Performs the conversion.
Source§

impl TryFromPrimitive for Color

Source§

impl Copy for Color

Auto Trait Implementations§

§

impl Freeze for Color

§

impl RefUnwindSafe for Color

§

impl Send for Color

§

impl Sync for Color

§

impl Unpin for Color

§

impl UnwindSafe for Color

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

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

Source§

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§

fn to_string(&self) -> String

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

impl<T> ToStringFallible for T
where T: Display,

Source§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

Source§

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

Source§

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>,

Source§

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more