pub struct Color {
pub r: f32,
pub g: f32,
pub b: f32,
pub a: f32,
}Expand description
RGBA color, each channel in [0, 1].
Fields§
§r: f32Red channel.
g: f32Green channel.
b: f32Blue channel.
a: f32Alpha channel.
Implementations§
Trait Implementations§
Source§impl From<&'static str> for Color
impl From<&'static str> for Color
Source§fn from(hex: &'static str) -> Self
fn from(hex: &'static str) -> Self
Parses #rgb, #rgba, #rrggbb, or #rrggbbaa literals.
Falls back to Color::default on any parse error - this
impl is intended for the Adwaita defaults table where every
literal is known-good at compile time.
Source§impl From<Color> for PropertyValue
impl From<Color> for PropertyValue
Source§impl From<PropertyValue> for Color
impl From<PropertyValue> for Color
Source§fn from(v: PropertyValue) -> Self
fn from(v: PropertyValue) -> Self
Converts to this type from the input type.
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 UnsafeUnpin 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FromTemplate for T
impl<T> FromTemplate for T
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.
§impl<T> Template for T
impl<T> Template for T
§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
Uses this template and the given
entity context to produce a Template::Output.§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clones this template. See
Clone.