Struct egui::color::Rgba [−][src]
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.
pub fn add(self, rhs: Rgba) -> Rgba
[src]
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 HsvaGamma
[src]
impl From<Rgba> for Hsva
[src]
impl From<Rgba> for Color32
[src]
impl Index<usize> for Rgba
[src]
impl IndexMut<usize> for Rgba
[src]
impl Mul<Rgba> for Rgba
[src]
type Output = Rgba
The resulting type after applying the *
operator.
pub fn mul(self, other: Rgba) -> Rgba
[src]
impl Mul<f32> for Rgba
[src]
type Output = Rgba
The resulting type after applying the *
operator.
pub fn mul(self, factor: f32) -> Rgba
[src]
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]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,