Struct egui::Rgba[][src]

pub struct Rgba(_);

0-1 linear space RGBA color with premultiplied alpha.

Implementations

impl Rgba[src]

pub const TRANSPARENT: Rgba[src]

pub const BLACK: Rgba[src]

pub const WHITE: Rgba[src]

pub const RED: Rgba[src]

pub const GREEN: Rgba[src]

pub const BLUE: Rgba[src]

pub const fn from_rgba_premultiplied(r: f32, g: f32, b: f32, a: f32) -> Rgba[src]

pub const fn from_rgb(r: f32, g: f32, b: f32) -> Rgba[src]

pub const fn from_gray(l: f32) -> Rgba[src]

pub fn from_luminance_alpha(l: f32, a: f32) -> Rgba[src]

pub fn from_black_alpha(a: f32) -> Rgba[src]

Transparent black

pub fn from_white_alpha(a: f32) -> Rgba[src]

Transparent white

pub fn additive(self) -> Rgba[src]

Return an additive version of this color (alpha = 0)

pub fn multiply(self, alpha: f32) -> Rgba[src]

Multiply with e.g. 0.5 to make us half transparent

pub fn r(&self) -> f32[src]

pub fn g(&self) -> f32[src]

pub fn b(&self) -> f32[src]

pub fn a(&self) -> f32[src]

pub fn intensity(&self) -> f32[src]

How perceptually intense (bright) is the color?

pub fn to_opaque(&self) -> Rgba[src]

Returns an opaque version of self

Trait Implementations

impl Add<Rgba> for Rgba[src]

type Output = Rgba

The resulting type after applying the + operator.

impl Clone for Rgba[src]

impl Copy for Rgba[src]

impl Debug for Rgba[src]

impl Default for Rgba[src]

impl From<Color32> for Rgba[src]

impl From<Hsva> for Rgba[src]

impl From<HsvaGamma> for Rgba[src]

impl From<Rgba> for Hsva[src]

impl From<Rgba> for HsvaGamma[src]

impl From<Rgba> for Color32[src]

impl Index<usize> for Rgba[src]

type Output = f32

The returned type after indexing.

impl IndexMut<usize> for Rgba[src]

impl Mul<Rgba> for Rgba[src]

type Output = Rgba

The resulting type after applying the * operator.

impl Mul<f32> for Rgba[src]

type Output = Rgba

The resulting type after applying the * operator.

impl PartialEq<Rgba> for Rgba[src]

impl StructuralPartialEq for Rgba[src]

Auto Trait Implementations

impl RefUnwindSafe for Rgba

impl Send for Rgba

impl Sync for Rgba

impl Unpin for Rgba

impl UnwindSafe for Rgba

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> 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.