pub struct RGBA(/* private fields */);
Expand description
sRGBA color packed as [u8; 4]
Implementations§
Trait Implementations§
Source§impl Color for RGBA
impl Color for RGBA
Source§fn blend_over(self, other: Self) -> Self
fn blend_over(self, other: Self) -> Self
Blend other color on top of this color
Source§fn with_alpha(self, alpha: Scalar) -> Self
fn with_alpha(self, alpha: Scalar) -> Self
Override alpha component of the color
Source§fn lerp(self, other: Self, t: f32) -> Self
fn lerp(self, other: Self, t: f32) -> Self
Linear interpolation between self and other colors.
Source§fn best_contrast(self, c0: Self, c1: Self) -> Self
fn best_contrast(self, c0: Self, c1: Self) -> Self
Pick color that produces the best contrast with self
Source§impl<'de> Deserialize<'de> for RGBA
impl<'de> Deserialize<'de> for RGBA
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for RGBA
impl Ord for RGBA
Source§impl PartialOrd for RGBA
impl PartialOrd for RGBA
impl Copy for RGBA
impl Eq for RGBA
impl Pod for RGBA
impl StructuralPartialEq for RGBA
Auto Trait Implementations§
impl Freeze for RGBA
impl RefUnwindSafe for RGBA
impl Send for RGBA
impl Sync for RGBA
impl Unpin for RGBA
impl UnwindSafe for RGBA
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.