Struct widgetry::Color [−][src]
Fields
r: f32
g: f32
b: f32
a: f32
Implementations
impl Color
[src]
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<'de> Deserialize<'de> 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 From<Color> for RewriteColor
[src]
impl From<Color> for RewriteColor
[src]fn from(color: Color) -> RewriteColor
[src]
impl Copy for Color
[src]
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> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,