pub enum Purple {
Show 24 variants
Indigo,
Purple,
DarkMagenta,
DarkViolet,
DarkSlateBlue,
BlueViolet,
DarkOrchid,
Fuchsia,
Magenta,
SlateBlue,
MediumSlateBlue,
MediumOrchid,
MediumPurple,
Orchid,
Violet,
Plum,
Thistle,
Lavender,
Pink,
MediumVioletRed,
PaleVioletRed,
DeepPink,
HotPink,
LightPink,
}Available on crate feature
extended only.Expand description
Shades of purple
Variants§
Indigo
Purple
DarkMagenta
DarkViolet
DarkSlateBlue
BlueViolet
DarkOrchid
Fuchsia
Magenta
SlateBlue
MediumSlateBlue
MediumOrchid
MediumPurple
Orchid
Violet
Plum
Thistle
Lavender
Pink
MediumVioletRed
PaleVioletRed
DeepPink
HotPink
LightPink
Implementations§
Source§impl Purple
impl Purple
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 = Purple::Violet;
let rgb_colour = colour.to_rgb();
let string = rgb_colour.to_string();
assert_eq!("rgb(238,130,238)", 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 = Purple::Plum;
assert_eq!("#DDA0DD", colour.to_hex_triplet(Prefix::Hash));
Trait Implementations§
Source§impl ExtendedColour for Purple
impl ExtendedColour for Purple
impl Copy for Purple
impl Eq for Purple
impl StructuralPartialEq for Purple
Auto Trait Implementations§
impl Freeze for Purple
impl RefUnwindSafe for Purple
impl Send for Purple
impl Sync for Purple
impl Unpin for Purple
impl UnwindSafe for Purple
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