pub enum Yellow {
Show 14 variants
Gold,
DarkGoldenrod,
Goldenrod,
PaleGoldenrod,
DarkKhaki,
Khaki,
Yellow,
YellowGreen,
PeachPuff,
Moccasin,
PapayaWhip,
LightGoldenrodYellow,
LemonChiffon,
LightYellow,
}Expand description
Shades of yellow
Variants§
Gold
DarkGoldenrod
Goldenrod
PaleGoldenrod
DarkKhaki
Khaki
Yellow
YellowGreen
PeachPuff
Moccasin
PapayaWhip
LightGoldenrodYellow
LemonChiffon
LightYellow
Implementations§
Source§impl Yellow
impl Yellow
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 = Yellow::Khaki.to_rgb();
let string = rgb_colour.to_string();
assert_eq!("rgb(240,230,140)", 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 = Yellow::Khaki;
assert_eq!("#F0E68C", colour.to_hex_triplet(Prefix::Hash));
Trait Implementations§
Source§impl ExtendedColour for Yellow
impl ExtendedColour for Yellow
impl Copy for Yellow
impl Eq for Yellow
impl StructuralPartialEq for Yellow
Auto Trait Implementations§
impl Freeze for Yellow
impl RefUnwindSafe for Yellow
impl Send for Yellow
impl Sync for Yellow
impl Unpin for Yellow
impl UnwindSafe for Yellow
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