vizia::style

Struct RGBA

#[repr(C)]
pub struct RGBA { pub red: u8, pub green: u8, pub blue: u8, pub alpha: u8, }
Expand description

A color with red, green, blue, and alpha components, in a byte each.

Fields§

§red: u8

The red component.

§green: u8

The green component.

§blue: u8

The blue component.

§alpha: u8

The alpha component.

Implementations§

§

impl RGBA

pub const BLACK: RGBA = _

pub const SILVER: RGBA = _

pub const GRAY: RGBA = _

pub const WHITE: RGBA = _

pub const MAROON: RGBA = _

pub const RED: RGBA = _

pub const PURPLE: RGBA = _

pub const FUCHSIA: RGBA = _

pub const GREEN: RGBA = _

pub const LIME: RGBA = _

pub const OLIVE: RGBA = _

pub const YELLOW: RGBA = _

pub const NAVY: RGBA = _

pub const BLUE: RGBA = _

pub const TEAL: RGBA = _

pub const AQUA: RGBA = _

pub const ALICEBLUE: RGBA = _

pub const ANTIQUEWHITE: RGBA = _

pub const AQUAMARINE: RGBA = _

pub const AZURE: RGBA = _

pub const BEIGE: RGBA = _

pub const BISQUE: RGBA = _

pub const BLANCHEDALMOND: RGBA = _

pub const BLUEVIOLET: RGBA = _

pub const BROWN: RGBA = _

pub const BURLYWOOD: RGBA = _

pub const CADETBLUE: RGBA = _

pub const CHARTREUSE: RGBA = _

pub const CHOCOLATE: RGBA = _

pub const CORAL: RGBA = _

pub const CORNFLOWERBLUE: RGBA = _

pub const CORNSILK: RGBA = _

pub const CRIMSON: RGBA = _

pub const CYAN: RGBA = _

pub const DARKBLUE: RGBA = _

pub const DARKCYAN: RGBA = _

pub const DARKGOLDENROD: RGBA = _

pub const DARKGRAY: RGBA = _

pub const DARKGREEN: RGBA = _

pub const DARKGREY: RGBA = _

pub const DARKKHAKI: RGBA = _

pub const DARKMAGENTA: RGBA = _

pub const DARKOLIVEGREEN: RGBA = _

pub const DARKORANGE: RGBA = _

pub const DARKORCHID: RGBA = _

pub const DARKRED: RGBA = _

pub const DARKSALMON: RGBA = _

pub const DARKSEAGREEN: RGBA = _

pub const DARKSLATEBLUE: RGBA = _

pub const DARKSLATEGRAY: RGBA = _

pub const DARKSLATEGREY: RGBA = _

pub const DARKTURQUOISE: RGBA = _

pub const DARKVIOLET: RGBA = _

pub const DEEPPINK: RGBA = _

pub const DEEPSKYBLUE: RGBA = _

pub const DIMGRAY: RGBA = _

pub const DIMGREY: RGBA = _

pub const DODGERBLUE: RGBA = _

pub const FIREBRICK: RGBA = _

pub const FLORALWHITE: RGBA = _

pub const FORESTGREEN: RGBA = _

pub const GAINSBORO: RGBA = _

pub const GHOSTWHITE: RGBA = _

pub const GOLD: RGBA = _

pub const GOLDENROD: RGBA = _

pub const GREENYELLOW: RGBA = _

pub const GREY: RGBA = _

pub const HONEYDEW: RGBA = _

pub const HOTPINK: RGBA = _

pub const INDIANRED: RGBA = _

pub const INDIGO: RGBA = _

pub const IVORY: RGBA = _

pub const KHAKI: RGBA = _

pub const LAVENDER: RGBA = _

pub const LAVENDERBLUSH: RGBA = _

pub const LAWNGREEN: RGBA = _

pub const LEMONCHIFFON: RGBA = _

pub const LIGHTBLUE: RGBA = _

pub const LIGHTCORAL: RGBA = _

pub const LIGHTCYAN: RGBA = _

pub const LIGHTGOLDENRODYELLOW: RGBA = _

pub const LIGHTGRAY: RGBA = _

pub const LIGHTGREEN: RGBA = _

pub const LIGHTGREY: RGBA = _

pub const LIGHTPINK: RGBA = _

pub const LIGHTSALMON: RGBA = _

pub const LIGHTSEAGREEN: RGBA = _

pub const LIGHTSKYBLUE: RGBA = _

pub const LIGHTSLATEGRAY: RGBA = _

pub const LIGHTSLATEGREY: RGBA = _

pub const LIGHTSTEELBLUE: RGBA = _

pub const LIGHTYELLOW: RGBA = _

pub const LIMEGREEN: RGBA = _

pub const LINEN: RGBA = _

pub const MAGENTA: RGBA = _

pub const MEDIUMAQUAMARINE: RGBA = _

pub const MEDIUMBLUE: RGBA = _

pub const MEDIUMORCHID: RGBA = _

pub const MEDIUMPURPLE: RGBA = _

pub const MEDIUMSEAGREEN: RGBA = _

pub const MEDIUMSLATEBLUE: RGBA = _

pub const MEDIUMSPRINGGREEN: RGBA = _

pub const MEDIUMTURQUOISE: RGBA = _

pub const MEDIUMVIOLETRED: RGBA = _

pub const MIDNIGHTBLUE: RGBA = _

pub const MINTCREAM: RGBA = _

pub const MISTYROSE: RGBA = _

pub const MOCCASIN: RGBA = _

pub const NAVAJOWHITE: RGBA = _

pub const OLDLACE: RGBA = _

pub const OLIVEDRAB: RGBA = _

pub const ORANGE: RGBA = _

pub const ORANGERED: RGBA = _

pub const ORCHID: RGBA = _

pub const PALEGOLDENROD: RGBA = _

pub const PALEGREEN: RGBA = _

pub const PALETURQUOISE: RGBA = _

pub const PALEVIOLETRED: RGBA = _

pub const PAPAYAWHIP: RGBA = _

pub const PEACHPUFF: RGBA = _

pub const PERU: RGBA = _

pub const PINK: RGBA = _

pub const PLUM: RGBA = _

pub const POWDERBLUE: RGBA = _

pub const REBECCAPURPLE: RGBA = _

pub const ROSYBROWN: RGBA = _

pub const ROYALBLUE: RGBA = _

pub const SADDLEBROWN: RGBA = _

pub const SALMON: RGBA = _

pub const SANDYBROWN: RGBA = _

pub const SEAGREEN: RGBA = _

pub const SEASHELL: RGBA = _

pub const SIENNA: RGBA = _

pub const SKYBLUE: RGBA = _

pub const SLATEBLUE: RGBA = _

pub const SLATEGRAY: RGBA = _

pub const SLATEGREY: RGBA = _

pub const SNOW: RGBA = _

pub const SPRINGGREEN: RGBA = _

pub const STEELBLUE: RGBA = _

pub const TAN: RGBA = _

pub const THISTLE: RGBA = _

pub const TOMATO: RGBA = _

pub const TURQUOISE: RGBA = _

pub const VIOLET: RGBA = _

pub const WHEAT: RGBA = _

pub const WHITESMOKE: RGBA = _

pub const YELLOWGREEN: RGBA = _

pub const TRANSPARENT: RGBA = _

pub const fn rgb(red: u8, green: u8, blue: u8) -> RGBA

Creates a new RGBA from RGB values

pub const fn rgba(red: u8, green: u8, blue: u8, alpha: u8) -> RGBA

Creates a new RGBA from RGBA values

pub fn hsl(h: f32, s: f32, l: f32) -> RGBA

Creates a new RGBA from HSL values.

pub fn hsla(h: f32, s: f32, l: f32, a: f32) -> RGBA

Creates a new RGBA from HSLA values.

pub fn r(&self) -> u8

pub fn g(&self) -> u8

pub fn b(&self) -> u8

pub fn a(&self) -> u8

Trait Implementations§

§

impl Clone for RGBA

§

fn clone(&self) -> RGBA

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for RGBA

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<Color> for RGBA

§

fn from(color: Color) -> RGBA

Converts to this type from the input type.
§

impl From<RGBA> for Color

§

fn from(rgba: RGBA) -> Color

Converts to this type from the input type.
§

impl From<RGBA> for Color

§

fn from(src: RGBA) -> Color

Converts to this type from the input type.
§

impl From<RgbaLegacy> for RGBA

§

fn from(rgba: RgbaLegacy) -> RGBA

Converts to this type from the input type.
§

impl PartialEq for RGBA

§

fn eq(&self, other: &RGBA) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Res<RGBA> for RGBA

§

fn set_or_bind<F>(self, cx: &mut Context, entity: Entity, closure: F)
where Self: Sized, F: 'static + Clone + Fn(&mut Context, Self),

§

impl ResGet<RGBA> for RGBA

§

fn get_ref<'a>(&'a self, _: &'a impl DataContext) -> Option<LensValue<'a, RGBA>>

§

fn get(&self, _: &impl DataContext) -> RGBA

§

impl Copy 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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AnyEq for T
where T: Any + PartialEq,

§

fn equals(&self, other: &(dyn Any + 'static)) -> bool

§

fn as_any(&self) -> &(dyn Any + 'static)

source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more