pub struct ColorComponents {
pub red: f32,
pub green: f32,
pub blue: f32,
pub opacity: f32,
}
Expand description
Color components representing RGB values and opacity.
Values are stored with full precision internally and rounded to 4 decimal places during serialization and deserialization.
Opacity is automatically clamped to 0.0…1.0.
Fields§
§red: f32
§green: f32
§blue: f32
§opacity: f32
Implementations§
Trait Implementations§
Source§impl Clone for ColorComponents
impl Clone for ColorComponents
Source§fn clone(&self) -> ColorComponents
fn clone(&self) -> ColorComponents
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ColorComponents
impl Debug for ColorComponents
Source§impl PartialEq for ColorComponents
impl PartialEq for ColorComponents
impl Copy for ColorComponents
impl StructuralPartialEq for ColorComponents
Auto Trait Implementations§
impl Freeze for ColorComponents
impl RefUnwindSafe for ColorComponents
impl Send for ColorComponents
impl Sync for ColorComponents
impl Unpin for ColorComponents
impl UnwindSafe for ColorComponents
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