Struct fyrox_core::color::Color

source ·
#[repr(C)]
pub struct Color { pub r: u8, pub g: u8, pub b: u8, pub a: u8, }

Fields§

§r: u8§g: u8§b: u8§a: u8

Implementations§

source§

impl Color

source

pub const R: &'static str = "r"

source

pub const G: &'static str = "g"

source

pub const B: &'static str = "b"

source

pub const A: &'static str = "a"

source§

impl Color

source

pub const WHITE: Self = _

source

pub const BLACK: Self = _

source

pub const RED: Self = _

source

pub const GREEN: Self = _

source

pub const BLUE: Self = _

source

pub const TRANSPARENT: Self = _

source

pub const MAROON: Self = _

source

pub const DARK_RED: Self = _

source

pub const BROWN: Self = _

source

pub const FIREBRICK: Self = _

source

pub const CRIMSON: Self = _

source

pub const TOMATO: Self = _

source

pub const CORAL: Self = _

source

pub const INDIAN_RED: Self = _

source

pub const LIGHT_CORAL: Self = _

source

pub const DARK_SALMON: Self = _

source

pub const SALMON: Self = _

source

pub const LIGHT_SALMON: Self = _

source

pub const ORANGE_RED: Self = _

source

pub const DARK_ORANGE: Self = _

source

pub const ORANGE: Self = _

source

pub const GOLD: Self = _

source

pub const DARK_GOLDEN_ROD: Self = _

source

pub const GOLDEN_ROD: Self = _

source

pub const PALE_GOLDEN_ROD: Self = _

source

pub const DARK_KHAKI: Self = _

source

pub const KHAKI: Self = _

source

pub const OLIVE: Self = _

source

pub const YELLOW: Self = _

source

pub const YELLOW_GREEN: Self = _

source

pub const DARK_OLIVE_GREEN: Self = _

source

pub const OLIVE_DRAB: Self = _

source

pub const LAWN_GREEN: Self = _

source

pub const CHARTREUSE: Self = _

source

pub const GREEN_YELLOW: Self = _

source

pub const DARK_GREEN: Self = _

source

pub const FOREST_GREEN: Self = _

source

pub const LIME: Self = _

source

pub const LIME_GREEN: Self = _

source

pub const LIGHT_GREEN: Self = _

source

pub const PALE_GREEN: Self = _

source

pub const DARK_SEA_GREEN: Self = _

source

pub const MEDIUM_SPRING_GREEN: Self = _

source

pub const SPRING_GREEN: Self = _

source

pub const SEA_GREEN: Self = _

source

pub const MEDIUM_AQUA_MARINE: Self = _

source

pub const MEDIUM_SEA_GREEN: Self = _

source

pub const LIGHT_SEA_GREEN: Self = _

source

pub const DARK_SLATE_GRAY: Self = _

source

pub const TEAL: Self = _

source

pub const DARK_CYAN: Self = _

source

pub const AQUA: Self = _

source

pub const CYAN: Self = _

source

pub const LIGHT_CYAN: Self = _

source

pub const DARK_TURQUOISE: Self = _

source

pub const TURQUOISE: Self = _

source

pub const MEDIUM_TURQUOISE: Self = _

source

pub const PALE_TURQUOISE: Self = _

source

pub const AQUA_MARINE: Self = _

source

pub const POWDER_BLUE: Self = _

source

pub const CADET_BLUE: Self = _

source

pub const STEEL_BLUE: Self = _

source

pub const CORN_FLOWER_BLUE: Self = _

source

pub const DEEP_SKY_BLUE: Self = _

source

pub const DODGER_BLUE: Self = _

source

pub const LIGHT_BLUE: Self = _

source

pub const SKY_BLUE: Self = _

source

pub const LIGHT_SKY_BLUE: Self = _

source

pub const MIDNIGHT_BLUE: Self = _

source

pub const NAVY: Self = _

source

pub const DARK_BLUE: Self = _

source

pub const MEDIUM_BLUE: Self = _

source

pub const ROYAL_BLUE: Self = _

source

pub const BLUE_VIOLET: Self = _

source

pub const INDIGO: Self = _

source

pub const DARK_SLATE_BLUE: Self = _

source

pub const SLATE_BLUE: Self = _

source

pub const MEDIUM_SLATE_BLUE: Self = _

source

pub const MEDIUM_PURPLE: Self = _

source

pub const DARK_MAGENTA: Self = _

source

pub const DARK_VIOLET: Self = _

source

pub const DARK_ORCHID: Self = _

source

pub const MEDIUM_ORCHID: Self = _

source

pub const PURPLE: Self = _

source

pub const THISTLE: Self = _

source

pub const PLUM: Self = _

source

pub const VIOLET: Self = _

source

pub const MAGENTA: Self = _

source

pub const ORCHID: Self = _

source

pub const MEDIUM_VIOLET_RED: Self = _

source

pub const PALE_VIOLET_RED: Self = _

source

pub const DEEP_PINK: Self = _

source

pub const HOT_PINK: Self = _

source

pub const LIGHT_PINK: Self = _

source

pub const PINK: Self = _

source

pub const ANTIQUE_WHITE: Self = _

source

pub const BEIGE: Self = _

source

pub const BISQUE: Self = _

source

pub const BLANCHED_ALMOND: Self = _

source

pub const WHEAT: Self = _

source

pub const CORN_SILK: Self = _

source

pub const LEMON_CHIFFON: Self = _

source

pub const LIGHT_GOLDEN_ROD_YELLOW: Self = _

source

pub const LIGHT_YELLOW: Self = _

source

pub const SADDLE_BROWN: Self = _

source

pub const SIENNA: Self = _

source

pub const CHOCOLATE: Self = _

source

pub const PERU: Self = _

source

pub const SANDY_BROWN: Self = _

source

pub const BURLY_WOOD: Self = _

source

pub const TAN: Self = _

source

pub const ROSY_BROWN: Self = _

source

pub const MOCCASIN: Self = _

source

pub const NAVAJO_WHITE: Self = _

source

pub const PEACH_PUFF: Self = _

source

pub const MISTY_ROSE: Self = _

source

pub const LAVENDER_BLUSH: Self = _

source

pub const LINEN: Self = _

source

pub const OLD_LACE: Self = _

source

pub const PAPAYA_WHIP: Self = _

source

pub const SEA_SHELL: Self = _

source

pub const MINT_CREAM: Self = _

source

pub const SLATE_GRAY: Self = _

source

pub const LIGHT_SLATE_GRAY: Self = _

source

pub const LIGHT_STEEL_BLUE: Self = _

source

pub const LAVENDER: Self = _

source

pub const FLORAL_WHITE: Self = _

source

pub const ALICE_BLUE: Self = _

source

pub const GHOST_WHITE: Self = _

source

pub const HONEYDEW: Self = _

source

pub const IVORY: Self = _

source

pub const AZURE: Self = _

source

pub const SNOW: Self = _

source

pub const DIM_GRAY: Self = _

source

pub const GRAY: Self = _

source

pub const DARK_GRAY: Self = _

source

pub const SILVER: Self = _

source

pub const LIGHT_GRAY: Self = _

source

pub const GAINSBORO: Self = _

source

pub const WHITE_SMOKE: Self = _

source

pub const fn opaque(r: u8, g: u8, b: u8) -> Self

source

pub const fn repeat(c: u8) -> Self

source

pub const fn from_rgba(r: u8, g: u8, b: u8, a: u8) -> Self

source

pub fn srgb_to_linear(self) -> Self

source

pub fn srgb_to_linear_f32(self) -> Vector4<f32>

source

pub fn linear_to_srgb(self) -> Self

source

pub fn as_frgba(self) -> Vector4<f32>

source

pub fn as_frgb(self) -> Vector3<f32>

source

pub fn to_opaque(self) -> Self

source

pub fn lerp(self, other: Self, t: f32) -> Self

source

pub fn with_new_alpha(self, a: u8) -> Self

Trait Implementations§

source§

impl Add for Color

§

type Output = Color

The resulting type after applying the + operator.
source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
source§

impl AddAssign for Color

source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
source§

impl Clone for Color

source§

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 Debug for Color

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for Color

source§

fn default() -> Self

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

impl From<Color> for Hsl

source§

fn from(v: Color) -> Self

Converts to this type from the input type.
source§

impl From<Color> for Hsv

source§

fn from(color: Color) -> Self

Converts to this type from the input type.
source§

impl From<Hsl> for Color

source§

fn from(v: Hsl) -> Self

Converts to this type from the input type.
source§

impl From<Hsv> for Color

source§

fn from(hsv: Hsv) -> Self

Converts to this type from the input type.
source§

impl From<Matrix<f32, Const<3>, Const<1>, ArrayStorage<f32, 3, 1>>> for Color

source§

fn from(v: Vector3<f32>) -> Self

Converts to this type from the input type.
source§

impl From<Matrix<f32, Const<4>, Const<1>, ArrayStorage<f32, 4, 1>>> for Color

source§

fn from(v: Vector4<f32>) -> Self

Converts to this type from the input type.
source§

impl Into<u32> for Color

source§

fn into(self) -> u32

Converts this type into the (usually inferred) input type.
source§

impl PartialEq for Color

source§

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

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

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

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

impl PartialOrd for Color

source§

fn partial_cmp(&self, other: &Color) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Reflect for Color
where Self: 'static, u8: Reflect,

source§

fn type_name(&self) -> &'static str

source§

fn doc(&self) -> &'static str

source§

fn fields_info(&self, func: &mut dyn FnMut(&[FieldInfo<'_, '_>]))

source§

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

source§

fn set( &mut self, value: Box<dyn Reflect> ) -> Result<Box<dyn Reflect>, Box<dyn Reflect>>

source§

fn as_any(&self, func: &mut dyn FnMut(&dyn Any))

source§

fn as_any_mut(&mut self, func: &mut dyn FnMut(&mut dyn Any))

source§

fn as_reflect(&self, func: &mut dyn FnMut(&dyn Reflect))

source§

fn as_reflect_mut(&mut self, func: &mut dyn FnMut(&mut dyn Reflect))

source§

fn fields(&self, func: &mut dyn FnMut(&[&dyn Reflect]))

source§

fn fields_mut(&mut self, func: &mut dyn FnMut(&mut [&mut dyn Reflect]))

source§

fn field(&self, name: &str, func: &mut dyn FnMut(Option<&dyn Reflect>))

source§

fn field_mut( &mut self, name: &str, func: &mut dyn FnMut(Option<&mut dyn Reflect>) )

source§

fn set_field( &mut self, field: &str, value: Box<dyn Reflect>, func: &mut dyn FnMut(Result<Box<dyn Reflect>, Box<dyn Reflect>>) )

Calls user method specified with #[reflect(setter = ..)] or falls back to Reflect::field_mut
source§

fn as_array(&self, func: &mut dyn FnMut(Option<&dyn ReflectArray>))

source§

fn as_array_mut(&mut self, func: &mut dyn FnMut(Option<&mut dyn ReflectArray>))

source§

fn as_list(&self, func: &mut dyn FnMut(Option<&dyn ReflectList>))

source§

fn as_list_mut(&mut self, func: &mut dyn FnMut(Option<&mut dyn ReflectList>))

source§

fn as_inheritable_variable( &self, func: &mut dyn FnMut(Option<&dyn ReflectInheritableVariable>) )

source§

fn as_inheritable_variable_mut( &mut self, func: &mut dyn FnMut(Option<&mut dyn ReflectInheritableVariable>) )

source§

fn as_hash_map(&self, func: &mut dyn FnMut(Option<&dyn ReflectHashMap>))

source§

fn as_hash_map_mut( &mut self, func: &mut dyn FnMut(Option<&mut dyn ReflectHashMap>) )

source§

impl Sub for Color

§

type Output = Color

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
source§

impl SubAssign for Color

source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
source§

impl TypeUuidProvider for Color

source§

fn type_uuid() -> Uuid

Return type UUID.
source§

impl Visit for Color
where u8: Visit,

source§

fn visit(&mut self, name: &str, visitor: &mut Visitor) -> VisitResult

source§

impl Copy for Color

source§

impl Eq for Color

source§

impl StructuralEq for Color

source§

impl StructuralPartialEq for Color

Auto Trait Implementations§

§

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
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> FieldValue for T
where T: 'static,

source§

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

Casts self to a &dyn Any
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<R> GetField for R
where R: Reflect,

source§

fn get_field<T>(&self, name: &str, func: &mut dyn FnMut(Option<&T>))
where T: 'static,

source§

fn get_field_mut<T>(&mut self, name: &str, func: &mut dyn FnMut(Option<&mut T>))
where T: 'static,

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> ResolvePath for T
where T: Reflect,

source§

fn resolve_path<'p>( &self, path: &'p str, func: &mut dyn FnMut(Result<&(dyn Reflect + 'static), ReflectPathError<'p>>) )

source§

fn resolve_path_mut<'p>( &mut self, path: &'p str, func: &mut dyn FnMut(Result<&mut (dyn Reflect + 'static), ReflectPathError<'p>>) )

source§

fn get_resolve_path<'p, T: Reflect>( &self, path: &'p str, func: &mut dyn FnMut(Result<&T, ReflectPathError<'p>>) )

source§

fn get_resolve_path_mut<'p, T: Reflect>( &mut self, path: &'p str, func: &mut dyn FnMut(Result<&mut T, ReflectPathError<'p>>) )

source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

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

§

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

§

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

§

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, Right> ClosedAdd<Right> for T
where T: Add<Right, Output = T> + AddAssign<Right>,

§

impl<T, Right> ClosedSub<Right> for T
where T: Sub<Right, Output = T> + SubAssign<Right>,

source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,