Struct pixel_engine::graphics::Color
source · Expand description
Represent a Color in a RGBA format
Fields§
§r: u8
Red part of the color
g: u8
Green part of the color
b: u8
Blue part of the color
a: u8
Alpha part of the color
Implementations§
source§impl Color
impl Color
sourcepub const fn new_with_alpha(r: u8, g: u8, b: u8, a: u8) -> Color
pub const fn new_with_alpha(r: u8, g: u8, b: u8, a: u8) -> Color
Return a Color where alpha is also a argument
sourcepub const VERY_DARK_GREY: Color = Color::new(64, 64, 64)
pub const VERY_DARK_GREY: Color = Color::new(64, 64, 64)
Very Dark Grey Color
sourcepub const VERY_DARK_RED: Color = Color::new(64, 0, 0)
pub const VERY_DARK_RED: Color = Color::new(64, 0, 0)
Very Dark Red Color
sourcepub const DARK_YELLOW: Color = Color::new(128, 128, 0)
pub const DARK_YELLOW: Color = Color::new(128, 128, 0)
Dark Yellow Color
sourcepub const VERY_DARK_YELLOW: Color = Color::new(64, 64, 0)
pub const VERY_DARK_YELLOW: Color = Color::new(64, 64, 0)
Very Dark Yellow Color
sourcepub const DARK_GREEN: Color = Color::new(0, 128, 0)
pub const DARK_GREEN: Color = Color::new(0, 128, 0)
Dark Green Color
sourcepub const VERY_DARK_GREEN: Color = Color::new(0, 64, 0)
pub const VERY_DARK_GREEN: Color = Color::new(0, 64, 0)
Very Dark Green Color
sourcepub const VERY_DARK_CYAN: Color = Color::new(0, 64, 64)
pub const VERY_DARK_CYAN: Color = Color::new(0, 64, 64)
Very Dark Cyan Color
sourcepub const VERY_DARK_BLUE: Color = Color::new(0, 0, 64)
pub const VERY_DARK_BLUE: Color = Color::new(0, 0, 64)
Very Dark Blue Color
sourcepub const DARK_MAGENTA: Color = Color::new(128, 0, 128)
pub const DARK_MAGENTA: Color = Color::new(128, 0, 128)
Dark Magenta Color
sourcepub const VERY_DARK_MAGENTA: Color = Color::new(64, 0, 64)
pub const VERY_DARK_MAGENTA: Color = Color::new(64, 0, 64)
Very Dark Magenta Color
Trait Implementations§
source§impl PartialEq<Color> for Color
impl PartialEq<Color> for Color
impl Copy for Color
impl Eq for Color
impl StructuralEq for Color
impl StructuralPartialEq for Color
Auto Trait Implementations§
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnwindSafe for Color
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.