[−][src]Struct egui::paint::color::Srgba
This format is used for space-efficient color representation.
Instead of manipulating this directly it is often better
to first convert it to either Rgba
or Hsva
.
0-255 gamma space sRGBA
color with premultiplied alpha.
Alpha channel is in linear space.
Implementations
impl Srgba
[src]
pub const fn new(r: u8, g: u8, b: u8, a: u8) -> Self
[src]
pub const fn gray(l: u8) -> Self
[src]
pub const fn black_alpha(a: u8) -> Self
[src]
pub fn white_alpha(a: u8) -> Self
[src]
pub const fn additive_luminance(l: u8) -> Self
[src]
pub fn is_opaque(&self) -> bool
[src]
pub fn r(&self) -> u8
[src]
pub fn g(&self) -> u8
[src]
pub fn b(&self) -> u8
[src]
pub fn a(&self) -> u8
[src]
pub fn to_opaque(self) -> Self
[src]
Returns an opaque version of self
pub fn to_array(&self) -> [u8; 4]
[src]
pub fn to_tuple(&self) -> (u8, u8, u8, u8)
[src]
Trait Implementations
impl Clone for Srgba
[src]
impl Copy for Srgba
[src]
impl Debug for Srgba
[src]
impl Default for Srgba
[src]
impl Eq for Srgba
[src]
impl From<Hsva> for Srgba
[src]
impl From<Rgba> for Srgba
[src]
impl From<Srgba> for Rgba
[src]
impl From<Srgba> for Hsva
[src]
impl Hash for Srgba
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Index<usize> for Srgba
[src]
impl IndexMut<usize> for Srgba
[src]
impl PartialEq<Srgba> for Srgba
[src]
impl StructuralEq for Srgba
[src]
impl StructuralPartialEq for Srgba
[src]
Auto Trait Implementations
impl RefUnwindSafe for Srgba
impl Send for Srgba
impl Sync for Srgba
impl Unpin for Srgba
impl UnwindSafe for Srgba
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CallHasher for T where
T: Hash,
[src]
T: Hash,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,