pub enum Color {
Rgb(u8, u8, u8),
Cmyk(u8, u8, u8, u8),
Greyscale(u8),
}Expand description
A color, represented by RGB, CMYK or Greyscale values.
For all variants, the possible values range from 0 to 255.
§Examples
let red = genpdf::style::Color::Rgb(255, 0, 0);
let cyan = genpdf::style::Color::Cmyk(255, 0, 0, 0);
let grey = genpdf::style::Color::Greyscale(127);Variants§
Rgb(u8, u8, u8)
An RGB color with red, green and blue values between 0 and 255.
Cmyk(u8, u8, u8, u8)
An CMYK color with cyan, magenta, yellow and key values between 0 and 255.
Greyscale(u8)
A greyscale color with a value between 0 and 255.
Trait Implementations§
impl Copy for Color
impl Eq for Color
impl StructuralPartialEq 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> 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