Enum ggez::graphics::Color
[−]
pub enum Color { RGB(u8, u8, u8), RGBA(u8, u8, u8, u8), }
Variants
RGB(u8, u8, u8)
RGBA(u8, u8, u8, u8)
Methods
impl Color
fn to_u32(&self, format: &PixelFormat) -> u32
fn from_u32(format: &PixelFormat, pixel: u32) -> Color
fn rgb(&self) -> (u8, u8, u8)
fn rgba(&self) -> (u8, u8, u8, u8)
Trait Implementations
impl Eq for Color
impl Hash for Color
impl Debug for Color
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.
impl PartialEq<Color> for Color
fn eq(&self, __arg_0: &Color) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Color) -> bool
This method tests for !=
.
impl Copy for Color
impl Clone for Color
fn clone(&self) -> Color
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more