pub enum Brown {
SaddleBrown,
Sienna,
Chocolate,
Peru,
SandyBrown,
BurlyWood,
Tan,
RosyBrown,
}Expand description
Shades of brown
Variants§
Implementations§
Source§impl Brown
impl Brown
Sourcepub fn to_rgb(&self) -> Rgb<u8>
pub fn to_rgb(&self) -> Rgb<u8>
Display the colour name as an RGB Tuple
§Example
let colour = Brown::Peru;
let rgb_colour = colour.to_rgb();
let string = rgb_colour.to_string();
assert_eq!("rgb(205,133,63)", 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 = Brown::SandyBrown;
assert_eq!("#F4A460", colour.to_hex_triplet(Prefix::Hash));
Trait Implementations§
Source§impl ExtendedColour for Brown
impl ExtendedColour for Brown
impl Copy for Brown
impl Eq for Brown
impl StructuralPartialEq for Brown
Auto Trait Implementations§
impl Freeze for Brown
impl RefUnwindSafe for Brown
impl Send for Brown
impl Sync for Brown
impl Unpin for Brown
impl UnwindSafe for Brown
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