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
impl Color
pub const WHITE: Self = _
pub const BLACK: Self = _
pub const RED: Self = _
pub const GREEN: Self = _
pub const BLUE: Self = _
pub const TRANSPARENT: Self = _
pub const MAROON: Self = _
pub const DARK_RED: Self = _
pub const BROWN: Self = _
pub const FIREBRICK: Self = _
pub const CRIMSON: Self = _
pub const TOMATO: Self = _
pub const CORAL: Self = _
pub const INDIAN_RED: Self = _
pub const LIGHT_CORAL: Self = _
pub const DARK_SALMON: Self = _
pub const SALMON: Self = _
pub const LIGHT_SALMON: Self = _
pub const ORANGE_RED: Self = _
pub const DARK_ORANGE: Self = _
pub const ORANGE: Self = _
pub const GOLD: Self = _
pub const DARK_GOLDEN_ROD: Self = _
pub const GOLDEN_ROD: Self = _
pub const PALE_GOLDEN_ROD: Self = _
pub const DARK_KHAKI: Self = _
pub const KHAKI: Self = _
pub const OLIVE: Self = _
pub const YELLOW: Self = _
pub const YELLOW_GREEN: Self = _
pub const DARK_OLIVE_GREEN: Self = _
pub const OLIVE_DRAB: Self = _
pub const LAWN_GREEN: Self = _
pub const CHARTREUSE: Self = _
pub const GREEN_YELLOW: Self = _
pub const DARK_GREEN: Self = _
pub const FOREST_GREEN: Self = _
pub const LIME: Self = _
pub const LIME_GREEN: Self = _
pub const LIGHT_GREEN: Self = _
pub const PALE_GREEN: Self = _
pub const DARK_SEA_GREEN: Self = _
pub const MEDIUM_SPRING_GREEN: Self = _
pub const SPRING_GREEN: Self = _
pub const SEA_GREEN: Self = _
pub const MEDIUM_AQUA_MARINE: Self = _
pub const MEDIUM_SEA_GREEN: Self = _
pub const LIGHT_SEA_GREEN: Self = _
pub const DARK_SLATE_GRAY: Self = _
pub const TEAL: Self = _
pub const DARK_CYAN: Self = _
pub const AQUA: Self = _
pub const CYAN: Self = _
pub const LIGHT_CYAN: Self = _
pub const DARK_TURQUOISE: Self = _
pub const TURQUOISE: Self = _
pub const MEDIUM_TURQUOISE: Self = _
pub const PALE_TURQUOISE: Self = _
pub const AQUA_MARINE: Self = _
pub const POWDER_BLUE: Self = _
pub const CADET_BLUE: Self = _
pub const STEEL_BLUE: Self = _
pub const CORN_FLOWER_BLUE: Self = _
pub const DEEP_SKY_BLUE: Self = _
pub const DODGER_BLUE: Self = _
pub const LIGHT_BLUE: Self = _
pub const SKY_BLUE: Self = _
pub const LIGHT_SKY_BLUE: Self = _
pub const MIDNIGHT_BLUE: Self = _
pub const NAVY: Self = _
pub const DARK_BLUE: Self = _
pub const MEDIUM_BLUE: Self = _
pub const ROYAL_BLUE: Self = _
pub const BLUE_VIOLET: Self = _
pub const INDIGO: Self = _
pub const DARK_SLATE_BLUE: Self = _
pub const SLATE_BLUE: Self = _
pub const MEDIUM_SLATE_BLUE: Self = _
pub const MEDIUM_PURPLE: Self = _
pub const DARK_MAGENTA: Self = _
pub const DARK_VIOLET: Self = _
pub const DARK_ORCHID: Self = _
pub const MEDIUM_ORCHID: Self = _
pub const PURPLE: Self = _
pub const THISTLE: Self = _
pub const PLUM: Self = _
pub const VIOLET: Self = _
pub const MAGENTA: Self = _
pub const ORCHID: Self = _
pub const MEDIUM_VIOLET_RED: Self = _
pub const PALE_VIOLET_RED: Self = _
pub const DEEP_PINK: Self = _
pub const HOT_PINK: Self = _
pub const LIGHT_PINK: Self = _
pub const PINK: Self = _
pub const ANTIQUE_WHITE: Self = _
pub const BEIGE: Self = _
pub const BISQUE: Self = _
pub const BLANCHED_ALMOND: Self = _
pub const WHEAT: Self = _
pub const CORN_SILK: Self = _
pub const LEMON_CHIFFON: Self = _
pub const LIGHT_GOLDEN_ROD_YELLOW: Self = _
pub const LIGHT_YELLOW: Self = _
pub const SADDLE_BROWN: Self = _
pub const SIENNA: Self = _
pub const CHOCOLATE: Self = _
pub const PERU: Self = _
pub const SANDY_BROWN: Self = _
pub const BURLY_WOOD: Self = _
pub const TAN: Self = _
pub const ROSY_BROWN: Self = _
pub const MOCCASIN: Self = _
pub const NAVAJO_WHITE: Self = _
pub const PEACH_PUFF: Self = _
pub const MISTY_ROSE: Self = _
pub const LAVENDER_BLUSH: Self = _
pub const LINEN: Self = _
pub const OLD_LACE: Self = _
pub const PAPAYA_WHIP: Self = _
pub const SEA_SHELL: Self = _
pub const MINT_CREAM: Self = _
pub const SLATE_GRAY: Self = _
pub const LIGHT_SLATE_GRAY: Self = _
pub const LIGHT_STEEL_BLUE: Self = _
pub const LAVENDER: Self = _
pub const FLORAL_WHITE: Self = _
pub const ALICE_BLUE: Self = _
pub const GHOST_WHITE: Self = _
pub const HONEYDEW: Self = _
pub const IVORY: Self = _
pub const AZURE: Self = _
pub const SNOW: Self = _
pub const DIM_GRAY: Self = _
pub const GRAY: Self = _
pub const DARK_GRAY: Self = _
pub const SILVER: Self = _
pub const LIGHT_GRAY: Self = _
pub const GAINSBORO: Self = _
pub const WHITE_SMOKE: Self = _
pub const fn opaque(r: u8, g: u8, b: u8) -> Self
pub const fn repeat(c: u8) -> Self
pub const fn from_rgba(r: u8, g: u8, b: u8, a: u8) -> Self
pub fn srgb_to_linear(self) -> Self
pub fn srgb_to_linear_f32(self) -> Vector4<f32>
pub fn linear_to_srgb(self) -> Self
pub fn as_frgba(self) -> Vector4<f32>
pub fn as_frgb(self) -> Vector3<f32>
pub fn to_opaque(self) -> Self
pub fn lerp(self, other: Self, t: f32) -> Self
pub fn with_new_alpha(self, a: u8) -> Self
Trait Implementations§
source§impl AddAssign for Color
impl AddAssign for Color
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moresource§impl PartialEq for Color
impl PartialEq for Color
source§impl PartialOrd for Color
impl PartialOrd for Color
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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 moresource§impl Reflect for Color
impl Reflect for Color
fn type_name(&self) -> &'static str
fn doc(&self) -> &'static str
fn fields_info(&self, func: &mut dyn FnMut(&[FieldInfo<'_, '_>]))
fn into_any(self: Box<Self>) -> Box<dyn Any>
fn set( &mut self, value: Box<dyn Reflect> ) -> Result<Box<dyn Reflect>, Box<dyn Reflect>>
fn as_any(&self, func: &mut dyn FnMut(&dyn Any))
fn as_any_mut(&mut self, func: &mut dyn FnMut(&mut dyn Any))
fn as_reflect(&self, func: &mut dyn FnMut(&dyn Reflect))
fn as_reflect_mut(&mut self, func: &mut dyn FnMut(&mut dyn Reflect))
fn fields(&self, func: &mut dyn FnMut(&[&dyn Reflect]))
fn fields_mut(&mut self, func: &mut dyn FnMut(&mut [&mut dyn Reflect]))
fn field(&self, name: &str, func: &mut dyn FnMut(Option<&dyn Reflect>))
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>>)
)
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
fn as_array(&self, func: &mut dyn FnMut(Option<&dyn ReflectArray>))
fn as_array_mut(&mut self, func: &mut dyn FnMut(Option<&mut dyn ReflectArray>))
fn as_list(&self, func: &mut dyn FnMut(Option<&dyn ReflectList>))
fn as_list_mut(&mut self, func: &mut dyn FnMut(Option<&mut dyn ReflectList>))
fn as_inheritable_variable( &self, func: &mut dyn FnMut(Option<&dyn ReflectInheritableVariable>) )
fn as_inheritable_variable_mut( &mut self, func: &mut dyn FnMut(Option<&mut dyn ReflectInheritableVariable>) )
fn as_hash_map(&self, func: &mut dyn FnMut(Option<&dyn ReflectHashMap>))
fn as_hash_map_mut( &mut self, func: &mut dyn FnMut(Option<&mut dyn ReflectHashMap>) )
source§impl SubAssign for Color
impl SubAssign for Color
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moreimpl Copy for Color
impl Eq for Color
impl StructuralEq for Color
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> FieldValue for Twhere
T: 'static,
impl<T> FieldValue for Twhere
T: 'static,
source§impl<T> ResolvePath for Twhere
T: Reflect,
impl<T> ResolvePath for Twhere
T: Reflect,
fn resolve_path<'p>( &self, path: &'p str, func: &mut dyn FnMut(Result<&(dyn Reflect + 'static), ReflectPathError<'p>>) )
fn resolve_path_mut<'p>( &mut self, path: &'p str, func: &mut dyn FnMut(Result<&mut (dyn Reflect + 'static), ReflectPathError<'p>>) )
fn get_resolve_path<'p, T: Reflect>( &self, path: &'p str, func: &mut dyn FnMut(Result<&T, ReflectPathError<'p>>) )
fn get_resolve_path_mut<'p, T: Reflect>( &mut self, path: &'p str, func: &mut dyn FnMut(Result<&mut T, ReflectPathError<'p>>) )
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
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
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
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
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.