pub struct RGBAColor {
pub r: u8,
pub g: u8,
pub b: u8,
pub a: u8,
}Expand description
RGBA Color
§Examples
use xuko_misc::color::RGBAColor;
let color = RGBAColor::from(0xFF33AA);
assert_eq!(color.r, 255);
assert_eq!(color.g, 51);
assert_eq!(color.b, 170);
assert_eq!(color.a, 255);Fields§
§r: u8The red component of the RGBAColor
g: u8The green component of the RGBAColor
b: u8The blue component of the RGBAColor
a: u8The alpha component of the RGBAColor
Implementations§
Trait Implementations§
impl Copy for RGBAColor
impl Eq for RGBAColor
impl StructuralPartialEq for RGBAColor
Auto Trait Implementations§
impl Freeze for RGBAColor
impl RefUnwindSafe for RGBAColor
impl Send for RGBAColor
impl Sync for RGBAColor
impl Unpin for RGBAColor
impl UnsafeUnpin for RGBAColor
impl UnwindSafe for RGBAColor
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