pub struct Color {
pub r: f32,
pub g: f32,
pub b: f32,
pub a: f32,
}Expand description
RGBA color (0.0 - 1.0)
Fields§
§r: f32§g: f32§b: f32§a: f32Implementations§
Source§impl Color
impl Color
pub fn new(r: f32, g: f32, b: f32, a: f32) -> Self
Sourcepub fn from_heatmap(intensity: f32) -> Self
pub fn from_heatmap(intensity: f32) -> Self
Create color from heatmap value (0.0-1.0) Blue -> Cyan -> Green -> Yellow -> Red
Sourcepub fn from_c_plane_angle(c_angle: f32) -> Self
pub fn from_c_plane_angle(c_angle: f32) -> Self
Create rainbow color from angle (0-360 degrees)
Sourcepub fn solid_default() -> Self
pub fn solid_default() -> Self
Default solid color (semi-transparent blue)
Trait Implementations§
impl 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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)