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 PartialEq for RGBA
impl PartialEq for RGBA
source§impl PartialOrd for RGBA
impl PartialOrd for RGBA
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl 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,
§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<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.