#[repr(C)]pub struct Color(/* private fields */);
Implementations§
source§impl Color
impl Color
pub fn from_rgb(r: u8, g: u8, b: u8) -> Color
pub fn from_rgba(r: u8, g: u8, b: u8, a: u8) -> Color
pub const fn from_rgb_f(r: f32, g: f32, b: f32) -> Color
pub const fn from_rgba_f(r: f32, g: f32, b: f32, a: f32) -> Color
pub const fn from_allegro_color(c: ALLEGRO_COLOR) -> Color
pub const fn get_allegro_color(&self) -> ALLEGRO_COLOR
pub fn to_rgb(&self) -> (u8, u8, u8)
pub fn to_rgba(&self) -> (u8, u8, u8, u8)
pub const fn to_rgb_f(&self) -> (f32, f32, f32)
pub const fn to_rgba_f(&self) -> (f32, f32, f32, f32)
Trait Implementations§
source§impl PartialEq for Color
impl PartialEq for Color
source§impl PartialOrd for Color
impl PartialOrd for Color
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy 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