pub struct Color {
pub red: f32,
pub green: f32,
pub blue: f32,
pub alpha: f32,
pub color_space: ColorSpace,
}Fields§
§red: f32§green: f32§blue: f32§alpha: f32§color_space: ColorSpaceImplementations§
Source§impl Color
impl Color
pub fn rgb(red: f32, green: f32, blue: f32) -> Self
pub fn rgba(red: f32, green: f32, blue: f32, alpha: f32) -> Self
pub fn argb_u32(num: u32) -> Self
pub fn argb_u16(num: u16) -> Self
pub fn with_alpha(self, alpha: f32) -> Self
pub fn with_color_space(self, color_space: ColorSpace) -> Self
Trait Implementations§
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