[][src]Struct egui::paint::color::Srgba

pub struct 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]

impl Index<usize> for Srgba[src]

type Output = u8

The returned type after indexing.

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CallHasher for T where
    T: Hash
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.