Struct kolorwheel::RgbColor
source · pub struct RgbColor {
pub r: u8,
pub g: u8,
pub b: u8,
}
Expand description
RGB representation of a color, which
can be implicitly converted (From/Into
) to RgbColor
Fields§
§r: u8
Red channel (0..=255)
g: u8
Green channel (0..=255)
b: u8
Blue channel (0..=255)
Trait Implementations§
source§impl FromStr for RgbColor
impl FromStr for RgbColor
Create RGB color from hex str
:
- “
#
” prefix is optional - both
RGB
andRRGGBB
format is accepted
source§impl PartialEq for RgbColor
impl PartialEq for RgbColor
impl Copy for RgbColor
impl Eq for RgbColor
impl StructuralEq for RgbColor
impl StructuralPartialEq for RgbColor
Auto Trait Implementations§
impl RefUnwindSafe for RgbColor
impl Send for RgbColor
impl Sync for RgbColor
impl Unpin for RgbColor
impl UnwindSafe for RgbColor
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