pub struct ColorRGBA { /* private fields */ }Expand description
A struct for defining a single color in RGBA space all values are between 0 and 1
Implementations§
Source§impl ColorRGBA
impl ColorRGBA
Sourcepub fn new(r: f32, g: f32, b: f32, a: f32) -> Self
pub fn new(r: f32, g: f32, b: f32, a: f32) -> Self
Constructs a new rgba color, all values are clamped to between 0 and 1
§Parameters
r: The red component
g: The green component
b: The blue component
a: The alpha component
Sourcepub fn new_rgb(r: f32, g: f32, b: f32) -> Self
pub fn new_rgb(r: f32, g: f32, b: f32) -> Self
Constructs a new rgba color with the alpha component equal to 1, all values are clamped to between 0 and 1
§Parameters
r: The red component
g: The green component
b: The blue component
Trait Implementations§
Source§impl Color for ColorRGBA
impl Color for ColorRGBA
Source§impl PartialOrd for ColorRGBA
impl PartialOrd for ColorRGBA
impl Copy for ColorRGBA
impl StructuralPartialEq for ColorRGBA
Auto Trait Implementations§
impl Freeze for ColorRGBA
impl RefUnwindSafe for ColorRGBA
impl Send for ColorRGBA
impl Sync for ColorRGBA
impl Unpin for ColorRGBA
impl UnwindSafe for ColorRGBA
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