Enum vizia_core::style::Color

pub enum Color {
    CurrentColor,
    RGBA(RGBA),
}
Expand description

A color value.

Variants§

§

CurrentColor

The ‘currentcolor’ keyword.

§

RGBA(RGBA)

A RGBA color value.

Implementations§

§

impl Color

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

Creates a new RGBA from RGB values

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

Creates a new RGBA from RGBA values

pub fn get_rgba(&self) -> RGBA

Return a new RGBA from the Color

pub fn r(&self) -> u8

pub fn g(&self) -> u8

pub fn b(&self) -> u8

pub fn a(&self) -> u8

§

impl Color

pub const fn black() -> Color

pub const fn silver() -> Color

pub const fn gray() -> Color

pub const fn white() -> Color

pub const fn maroon() -> Color

pub const fn red() -> Color

pub const fn purple() -> Color

pub const fn fuchsia() -> Color

pub const fn green() -> Color

pub const fn lime() -> Color

pub const fn olive() -> Color

pub const fn yellow() -> Color

pub const fn navy() -> Color

pub const fn blue() -> Color

pub const fn teal() -> Color

pub const fn aqua() -> Color

pub const fn aliceblue() -> Color

pub const fn antiquewhite() -> Color

pub const fn aquamarine() -> Color

pub const fn azure() -> Color

pub const fn beige() -> Color

pub const fn bisque() -> Color

pub const fn blanchedalmond() -> Color

pub const fn blueviolet() -> Color

pub const fn brown() -> Color

pub const fn burlywood() -> Color

pub const fn cadetblue() -> Color

pub const fn chartreuse() -> Color

pub const fn chocolate() -> Color

pub const fn coral() -> Color

pub const fn cornflowerblue() -> Color

pub const fn cornsilk() -> Color

pub const fn crimson() -> Color

pub const fn cyan() -> Color

pub const fn darkblue() -> Color

pub const fn darkcyan() -> Color

pub const fn darkgoldenrod() -> Color

pub const fn darkgray() -> Color

pub const fn darkgreen() -> Color

pub const fn darkgrey() -> Color

pub const fn darkkhaki() -> Color

pub const fn darkmagenta() -> Color

pub const fn darkolivegreen() -> Color

pub const fn darkorange() -> Color

pub const fn darkorchid() -> Color

pub const fn darkred() -> Color

pub const fn darksalmon() -> Color

pub const fn darkseagreen() -> Color

pub const fn darkslateblue() -> Color

pub const fn darkslategray() -> Color

pub const fn darkslategrey() -> Color

pub const fn darkturquoise() -> Color

pub const fn darkviolet() -> Color

pub const fn deeppink() -> Color

pub const fn deepskyblue() -> Color

pub const fn dimgray() -> Color

pub const fn dimgrey() -> Color

pub const fn dodgerblue() -> Color

pub const fn firebrick() -> Color

pub const fn floralwhite() -> Color

pub const fn forestgreen() -> Color

pub const fn gainsboro() -> Color

pub const fn ghostwhite() -> Color

pub const fn gold() -> Color

pub const fn goldenrod() -> Color

pub const fn greenyellow() -> Color

pub const fn grey() -> Color

pub const fn honeydew() -> Color

pub const fn hotpink() -> Color

pub const fn indianred() -> Color

pub const fn indigo() -> Color

pub const fn ivory() -> Color

pub const fn khaki() -> Color

pub const fn lavender() -> Color

pub const fn lavenderblush() -> Color

pub const fn lawngreen() -> Color

pub const fn lemonchiffon() -> Color

pub const fn lightblue() -> Color

pub const fn lightcoral() -> Color

pub const fn lightcyan() -> Color

pub const fn lightgoldenrodyellow() -> Color

pub const fn lightgray() -> Color

pub const fn lightgreen() -> Color

pub const fn lightgrey() -> Color

pub const fn lightpink() -> Color

pub const fn lightsalmon() -> Color

pub const fn lightseagreen() -> Color

pub const fn lightskyblue() -> Color

pub const fn lightslategray() -> Color

pub const fn lightslategrey() -> Color

pub const fn lightsteelblue() -> Color

pub const fn lightyellow() -> Color

pub const fn limegreen() -> Color

pub const fn linen() -> Color

pub const fn magenta() -> Color

pub const fn mediumaquamarine() -> Color

pub const fn mediumblue() -> Color

pub const fn mediumorchid() -> Color

pub const fn mediumpurple() -> Color

pub const fn mediumseagreen() -> Color

pub const fn mediumslateblue() -> Color

pub const fn mediumspringgreen() -> Color

pub const fn mediumturquoise() -> Color

pub const fn mediumvioletred() -> Color

pub const fn midnightblue() -> Color

pub const fn mintcream() -> Color

pub const fn mistyrose() -> Color

pub const fn moccasin() -> Color

pub const fn navajowhite() -> Color

pub const fn oldlace() -> Color

pub const fn olivedrab() -> Color

pub const fn orange() -> Color

pub const fn orangered() -> Color

pub const fn orchid() -> Color

pub const fn palegoldenrod() -> Color

pub const fn palegreen() -> Color

pub const fn paleturquoise() -> Color

pub const fn palevioletred() -> Color

pub const fn papayawhip() -> Color

pub const fn peachpuff() -> Color

pub const fn peru() -> Color

pub const fn pink() -> Color

pub const fn plum() -> Color

pub const fn powderblue() -> Color

pub const fn rebeccapurple() -> Color

pub const fn rosybrown() -> Color

pub const fn royalblue() -> Color

pub const fn saddlebrown() -> Color

pub const fn salmon() -> Color

pub const fn sandybrown() -> Color

pub const fn seagreen() -> Color

pub const fn seashell() -> Color

pub const fn sienna() -> Color

pub const fn skyblue() -> Color

pub const fn slateblue() -> Color

pub const fn slategray() -> Color

pub const fn slategrey() -> Color

pub const fn snow() -> Color

pub const fn springgreen() -> Color

pub const fn steelblue() -> Color

pub const fn tan() -> Color

pub const fn thistle() -> Color

pub const fn tomato() -> Color

pub const fn turquoise() -> Color

pub const fn violet() -> Color

pub const fn wheat() -> Color

pub const fn whitesmoke() -> Color

pub const fn yellowgreen() -> Color

pub const fn transparent() -> Color

Trait Implementations§

§

impl Clone for Color

§

fn clone(&self) -> Color

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
source§

impl Data for Color

source§

fn same(&self, other: &Self) -> bool

§

impl Debug for Color

§

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

Formats the value using the given formatter. Read more
§

impl Default for Color

§

fn default() -> Color

Returns the “default value” for a type. Read more
§

impl From<&str> for Color

§

fn from(s: &str) -> Color

Converts to this type from the input type.
§

impl From<Color> for Color

§

fn from(color: Color) -> Color

Converts to this type from the input type.
§

impl From<Color> for Color

§

fn from(src: Color) -> Color

Converts to this type from the input type.
§

impl From<Color> for Color4f

§

fn from(src: Color) -> Color4f

Converts to this type from the input type.
§

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<'i> Parse<'i> for Color

§

fn parse<'t>( input: &mut Parser<'i, 't>, ) -> Result<Color, ParseError<'i, CustomParseError<'i>>>

§

impl PartialEq for Color

§

fn eq(&self, other: &Color) -> 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<Color> for Color

source§

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

source§

impl ResGet<Color> for Color

source§

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

source§

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

§

impl Copy for Color

§

impl StructuralPartialEq for Color

Auto Trait Implementations§

§

impl Freeze for Color

§

impl RefUnwindSafe for Color

§

impl Send for Color

§

impl Sync for Color

§

impl Unpin for Color

§

impl UnwindSafe for Color

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