Struct widgetry::Color [−][src]
Fields
r: f32
g: f32
b: f32
a: f32
Implementations
impl Color
[src]
pub const CLEAR: Color
[src]
pub const BLACK: Color
[src]
pub const WHITE: Color
[src]
pub const RED: Color
[src]
pub const GREEN: Color
[src]
pub const BLUE: Color
[src]
pub const CYAN: Color
[src]
pub const YELLOW: Color
[src]
pub const PURPLE: Color
[src]
pub const PINK: Color
[src]
pub const ORANGE: Color
[src]
pub fn rgb(r: usize, g: usize, b: usize) -> Color
[src]
pub const fn rgb_f(r: f32, g: f32, b: f32) -> Color
[src]
pub fn rgba(r: usize, g: usize, b: usize, a: f32) -> Color
[src]
pub const fn rgba_f(r: f32, g: f32, b: f32, a: f32) -> Color
[src]
pub const fn grey(f: f32) -> Color
[src]
pub const fn alpha(&self, a: f32) -> Color
[src]
pub fn hex(raw: &str) -> Color
[src]
pub fn as_hex(&self) -> String
[src]
pub fn lerp(self, other: Color, pct: f64) -> Color
[src]
pub fn shade(self, black_ratio: f64) -> Color
[src]
pub fn tint(self, white_ratio: f64) -> Color
[src]
pub fn dull(self, ratio: f64) -> Color
[src]
Trait Implementations
impl Clone for Color
[src]
impl Copy for Color
[src]
impl Debug for Color
[src]
impl<'de> Deserialize<'de> for Color
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Display for Color
[src]
impl From<Color> for Fill
[src]
impl From<Color> for RewriteColor
[src]
fn from(color: Color) -> RewriteColor
[src]
impl PartialEq<Color> for Color
[src]
impl Serialize for Color
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for Color
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Any + Send + Sync,
T: Any + Send + Sync,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
pub 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>,