#[repr(C)]pub struct Color {
pub r: u8,
pub g: u8,
pub b: u8,
}
Expand description
Color
has public fields r
, g
, b
of type u8
which you can read
directly, or alternatively you may use the LowerHex and UpperHex impls to
format it as a hex color string.
format!("#{:x}", color)
⟶#f0f0f0
format!("#{:X}", color)
⟶#F0F0F0
Fields§
§r: u8
Red
g: u8
Green
b: u8
Blue
Implementations§
Trait Implementations§
impl Copy 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