[−][src]Struct quicksilver::graphics::Color
An RGBA color represented by normalized floats
Fields
r: f32
The red component of the color
g: f32
The green component of the color
b: f32
The blue component of the color
a: f32
The alpha component of the color
Methods
impl Color
[src]
pub fn with_red(self, r: f32) -> Color
[src]
Create an identical color with a different red component
pub fn with_green(self, g: f32) -> Color
[src]
Create an identical color with a different green component
pub fn with_blue(self, b: f32) -> Color
[src]
Create an identical color with a different blue component
pub fn with_alpha(self, a: f32) -> Color
[src]
Create an identical color with a different alpha component
pub fn multiply(self, other: Color) -> Color
[src]
Blend two colors by multiplying their components
pub fn from_rgba(red: u8, green: u8, blue: u8, a: f32) -> Color
[src]
Create a color from a common RGBA definition
pub fn from_hex(hex: &str) -> Color
[src]
Create a color from a hexadecimal code
impl Color
[src]
pub const WHITE: Color
[src]
pub const BLACK: Color
[src]
pub const RED: Color
[src]
pub const ORANGE: Color
[src]
pub const YELLOW: Color
[src]
pub const GREEN: Color
[src]
pub const CYAN: Color
[src]
pub const BLUE: Color
[src]
pub const MAGENTA: Color
[src]
pub const PURPLE: Color
[src]
pub const INDIGO: Color
[src]
Trait Implementations
impl Default for Color
[src]
impl Clone for Color
[src]
impl PartialEq<Color> for Color
[src]
impl<'a> From<Color> for Background<'a>
[src]
impl Copy for Color
[src]
impl Debug for Color
[src]
impl VertexConstructor<FillVertex, Vertex> for Color
[src]
fn new_vertex(&mut self, vertex: FillVertex) -> Vertex
[src]
impl VertexConstructor<StrokeVertex, Vertex> for Color
[src]
fn new_vertex(&mut self, vertex: StrokeVertex) -> Vertex
[src]
impl Serialize for Color
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Color
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for Color
impl Unpin for Color
impl Sync for Color
impl UnwindSafe for Color
impl RefUnwindSafe for Color
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> Scalar for T where
T: Copy + PartialEq<T> + Any + Debug,
[src]
T: Copy + PartialEq<T> + Any + Debug,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
[src]
fn is_in_subset(&self) -> bool
[src]
unsafe fn to_subset_unchecked(&self) -> SS
[src]
fn from_subset(element: &SS) -> SP
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> Slottable for T where
T: Copy,
[src]
T: Copy,
impl<F, Input, VertexType> VertexConstructor<Input, VertexType> for F where
F: Fn(Input) -> VertexType,
F: Fn(Input) -> VertexType,
fn new_vertex(&mut self, vertex: Input) -> VertexType
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,