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

impl Res<RGBA> for RGBA

Source§

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

Source§

impl ResGet<RGBA> for RGBA

Source§

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

Returns the value of a lens by reference.
Source§

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

returns the value of a lens by value.
§

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 u8)

🔬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 + Send + Sync>

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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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