pub enum Red {
Show 16 variants
Maroon,
DarkRed,
Brown,
Firebrick,
Crimson,
Red,
Tomato,
Coral,
IndianRed,
LightCoral,
DarkSalmon,
Salmon,
LightSalmon,
OrangeRed,
DarkOrange,
Orange,
}Available on crate feature
extended only.Expand description
Shades of red
Variants§
Maroon
DarkRed
Brown
Firebrick
Crimson
Red
Tomato
Coral
IndianRed
LightCoral
DarkSalmon
Salmon
LightSalmon
OrangeRed
DarkOrange
Orange
Implementations§
Source§impl Red
impl Red
Sourcepub fn to_rgb(&self) -> Rgb<u8>
pub fn to_rgb(&self) -> Rgb<u8>
Display the colour name as an RGB Tuple
§Example
let rgb_colour = Red::Maroon.to_rgb();
let string = rgb_colour.to_string();
assert_eq!("rgb(128,0,0)", string);
Sourcepub fn to_hex_triplet(&self, prefix: Prefix) -> String
pub fn to_hex_triplet(&self, prefix: Prefix) -> String
Display the colour name as an RGB Tuple
§Example
let colour = Red::Maroon;
assert_eq!("#800000", colour.to_hex_triplet(Prefix::Hash));
Trait Implementations§
Source§impl ExtendedColour for Red
impl ExtendedColour for Red
impl Copy for Red
impl Eq for Red
impl StructuralPartialEq for Red
Auto Trait Implementations§
impl Freeze for Red
impl RefUnwindSafe for Red
impl Send for Red
impl Sync for Red
impl Unpin for Red
impl UnwindSafe for Red
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more