Struct freya_engine::prelude::Color
pub struct Color(/* private fields */);
Implementations§
§impl Color
impl Color
pub const fn new(argb: u32) -> Color
pub const fn from_argb(a: u8, r: u8, g: u8, b: u8) -> Color
pub const fn from_rgb(r: u8, g: u8, b: u8) -> Color
pub fn a(self) -> u8
pub fn r(self) -> u8
pub fn g(self) -> u8
pub fn b(self) -> u8
pub fn with_a(self, a: u8) -> Color
pub const TRANSPARENT: Color = _
pub const BLACK: Color = _
pub const DARK_GRAY: Color = _
pub const GRAY: Color = _
pub const LIGHT_GRAY: Color = _
pub const WHITE: Color = _
pub const RED: Color = _
pub const GREEN: Color = _
pub const BLUE: Color = _
pub const YELLOW: Color = _
pub const CYAN: Color = _
pub const MAGENTA: Color = _
pub fn to_rgb(self) -> RGB
pub fn to_hsv(self) -> HSV
Trait Implementations§
§impl Pixel for Color
impl Pixel for Color
§fn matches_color_type(ct: ColorType) -> bool
fn matches_color_type(ct: ColorType) -> bool
true
if the type matches the color type’s format.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