pub struct Color32(pub f32, pub f32, pub f32, pub f32);
Expand description
Tuple Fields§
§0: f32
§1: f32
§2: f32
§3: f32
Implementations§
Source§impl Color32
impl Color32
Sourcepub const fn r(&self) -> f32
pub const fn r(&self) -> f32
Get the Red component of the Color32
.
This is the same as the X component.
Sourcepub const fn x(&self) -> f32
pub const fn x(&self) -> f32
Get the X component of the Color32
.
This is the same as the Red component.
Sourcepub const fn g(&self) -> f32
pub const fn g(&self) -> f32
Get the Green component of the Color32
.
This is the same as the Y component.
Sourcepub const fn y(&self) -> f32
pub const fn y(&self) -> f32
Get the Y component of the Color32
.
This is the same as the Green component.
Sourcepub const fn b(&self) -> f32
pub const fn b(&self) -> f32
Get the Blue component of the Color32
.
This is the same as the Z component.
Sourcepub const fn z(&self) -> f32
pub const fn z(&self) -> f32
Get the Z component of the Color32
.
This is the same as the Blue component.
Trait Implementations§
Source§impl Random for Color32
impl Random for Color32
Source§fn random_range_max(max: Self) -> Self
fn random_range_max(max: Self) -> Self
Get a random value, expanded to another range.
Source§fn random_range(min: Self, max: Self) -> Self
fn random_range(min: Self, max: Self) -> Self
Get a random value, expanded to another range.
impl Copy for Color32
Auto Trait Implementations§
impl Freeze for Color32
impl RefUnwindSafe for Color32
impl Send for Color32
impl Sync for Color32
impl Unpin for Color32
impl UnwindSafe for Color32
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.