pub struct Color(/* private fields */);
Expand description
A color with red, green, blue, and alpha channel.
Implementations§
Source§impl Color
impl Color
Sourcepub const ALICE_BLUE: Self
pub const ALICE_BLUE: Self
#F0F8FF = rgb(240 248 255)
Sourcepub const ANTIQUE_WHITE: Self
pub const ANTIQUE_WHITE: Self
#FAEBD7 = rgb(250 235 215)
Sourcepub const AQUA_MARINE: Self
pub const AQUA_MARINE: Self
#7FFFD4 = rgb(127 255 212)
Sourcepub const BLANCHEDALMOND: Self
pub const BLANCHEDALMOND: Self
#FFEBCD = rgb(255 235 205)
Sourcepub const BLUE_VIOLET: Self
pub const BLUE_VIOLET: Self
#8A2BE2 = rgb(138 43 226)
Sourcepub const CADET_BLUE: Self
pub const CADET_BLUE: Self
#5F9EA0 = rgb(95 158 160)
Sourcepub const CHARTREUSE: Self
pub const CHARTREUSE: Self
#7FFF00 = rgb(127 255 0)
Sourcepub const CORNFLOWER_BLUE: Self
pub const CORNFLOWER_BLUE: Self
#6495ED = rgb(100 149 237)
Sourcepub const DARK_GOLDENROD: Self
pub const DARK_GOLDENROD: Self
#B8860B = rgb(184 134 11)
Sourcepub const DARK_GREEN: Self
pub const DARK_GREEN: Self
#006400 = rgb(0 100 0)
Sourcepub const DARK_KHAKI: Self
pub const DARK_KHAKI: Self
#BDB76B = rgb(189 183 107)
Sourcepub const DARK_MAGENTA: Self
pub const DARK_MAGENTA: Self
#8B008B = rgb(139 0 139)
Sourcepub const DARK_OLIVE_GREEN: Self
pub const DARK_OLIVE_GREEN: Self
#556B2F = rgb(85 107 47)
Sourcepub const DARK_ORANGE: Self
pub const DARK_ORANGE: Self
#FF8C00 = rgb(255 140 0)
Sourcepub const DARK_ORCHID: Self
pub const DARK_ORCHID: Self
#9932CC = rgb(153 50 204)
Sourcepub const DARK_SALMON: Self
pub const DARK_SALMON: Self
#E9967A = rgb(233 150 122)
Sourcepub const DARK_SEAGREEN: Self
pub const DARK_SEAGREEN: Self
#8FBC8F = rgb(143 188 143)
Sourcepub const DARK_SLATE_BLUE: Self
pub const DARK_SLATE_BLUE: Self
#483D8B = rgb(72 61 139)
Sourcepub const DARK_SLATEGRAY: Self
pub const DARK_SLATEGRAY: Self
#2F4F4F = rgb(47 79 79)
Sourcepub const DARK_SLATEGREY: Self
pub const DARK_SLATEGREY: Self
#2F4F4F = rgb(47 79 79)
Sourcepub const DARK_TURQUOISE: Self
pub const DARK_TURQUOISE: Self
#00CED1 = rgb(0 206 209)
Sourcepub const DARK_VIOLET: Self
pub const DARK_VIOLET: Self
#9400D3 = rgb(148 0 211)
Sourcepub const DEEP_SKYBLUE: Self
pub const DEEP_SKYBLUE: Self
#00BFFF = rgb(0 191 255)
Sourcepub const DODGER_BLUE: Self
pub const DODGER_BLUE: Self
#1E90FF = rgb(30 144 255)
Sourcepub const FLORAL_WHITE: Self
pub const FLORAL_WHITE: Self
#FFFAF0 = rgb(255 250 240)
Sourcepub const FORESTGREEN: Self
pub const FORESTGREEN: Self
#228B22 = rgb(34 139 34)
Sourcepub const GHOST_WHITE: Self
pub const GHOST_WHITE: Self
#F8F8FF = rgb(248 248 255)
Sourcepub const GOLDEN_ROD: Self
pub const GOLDEN_ROD: Self
#DAA520 = rgb(218 165 32)
Sourcepub const GREEN_YELLOW: Self
pub const GREEN_YELLOW: Self
#ADFF2F = rgb(173 255 47)
Sourcepub const LAVENDERBLUSH: Self
pub const LAVENDERBLUSH: Self
#FFF0F5 = rgb(255 240 245)
Sourcepub const LAWN_GREEN: Self
pub const LAWN_GREEN: Self
#7CFC00 = rgb(124 252 0)
Sourcepub const LEMON_CHIFFON: Self
pub const LEMON_CHIFFON: Self
#FFFACD = rgb(255 250 205)
Sourcepub const LIGHT_BLUE: Self
pub const LIGHT_BLUE: Self
#ADD8E6 = rgb(173 216 230)
Sourcepub const LIGHT_CORAL: Self
pub const LIGHT_CORAL: Self
#F08080 = rgb(240 128 128)
Sourcepub const LIGHT_CYAN: Self
pub const LIGHT_CYAN: Self
#E0FFFF = rgb(224 255 255)
Sourcepub const LIGHT_GOLDEN_ROD_YELLOW: Self
pub const LIGHT_GOLDEN_ROD_YELLOW: Self
#FAFAD2 = rgb(250 250 210)
Sourcepub const LIGHT_GRAY: Self
pub const LIGHT_GRAY: Self
#D3D3D3 = rgb(211 211 211)
Sourcepub const LIGHT_GREEN: Self
pub const LIGHT_GREEN: Self
#90EE90 = rgb(144 238 144)
Sourcepub const LIGHT_GREY: Self
pub const LIGHT_GREY: Self
#D3D3D3 = rgb(211 211 211)
Sourcepub const LIGHT_PINK: Self
pub const LIGHT_PINK: Self
#FFB6C1 = rgb(255 182 193)
Sourcepub const LIGHT_SALMON: Self
pub const LIGHT_SALMON: Self
#FFA07A = rgb(255 160 122)
Sourcepub const LIGHT_SEA_GREEN: Self
pub const LIGHT_SEA_GREEN: Self
#20B2AA = rgb(32 178 170)
Sourcepub const LIGHT_SKY_BLUE: Self
pub const LIGHT_SKY_BLUE: Self
#87CEFA = rgb(135 206 250)
Sourcepub const LIGHT_SLATE_GRAY: Self
pub const LIGHT_SLATE_GRAY: Self
#778899 = rgb(119 136 153)
Sourcepub const LIGHT_SLATE_GREY: Self
pub const LIGHT_SLATE_GREY: Self
#778899 = rgb(119 136 153)
Sourcepub const LIGHT_STEEL_BLUE: Self
pub const LIGHT_STEEL_BLUE: Self
#B0C4DE = rgb(176 196 222)
Sourcepub const LIGHT_YELLOW: Self
pub const LIGHT_YELLOW: Self
#FFFFE0 = rgb(255 255 224)
Sourcepub const LIME_GREEN: Self
pub const LIME_GREEN: Self
#32CD32 = rgb(50 205 50)
Sourcepub const MEDIUM_AQUA_MARINE: Self
pub const MEDIUM_AQUA_MARINE: Self
#66CDAA = rgb(102 205 170)
Sourcepub const MEDIUM_BLUE: Self
pub const MEDIUM_BLUE: Self
#0000CD = rgb(0 0 205)
Sourcepub const MEDIUM_ORCHID: Self
pub const MEDIUM_ORCHID: Self
#BA55D3 = rgb(186 85 211)
Sourcepub const MEDIUM_PURPLE: Self
pub const MEDIUM_PURPLE: Self
#9370DB = rgb(147 112 219)
Sourcepub const MEDIUM_SEA_GREEN: Self
pub const MEDIUM_SEA_GREEN: Self
#3CB371 = rgb(60 179 113)
Sourcepub const MEDIUM_SLATE_BLUE: Self
pub const MEDIUM_SLATE_BLUE: Self
#7B68EE = rgb(123 104 238)
Sourcepub const MEDIUM_SPRING_GREEN: Self
pub const MEDIUM_SPRING_GREEN: Self
#00FA9A = rgb(0 250 154)
Sourcepub const MEDIUM_TURQUOISE: Self
pub const MEDIUM_TURQUOISE: Self
#48D1CC = rgb(72 209 204)
Sourcepub const MEDIUM_VIOLET_RED: Self
pub const MEDIUM_VIOLET_RED: Self
#C71585 = rgb(199 21 133)
Sourcepub const MIDNIGHT_BLUE: Self
pub const MIDNIGHT_BLUE: Self
#191970 = rgb(25 25 112)
Sourcepub const NAVAJO_WHITE: Self
pub const NAVAJO_WHITE: Self
#FFDEAD = rgb(255 222 173)
Sourcepub const PALE_GOLDEN_ROD: Self
pub const PALE_GOLDEN_ROD: Self
#EEE8AA = rgb(238 232 170)
Sourcepub const PALE_GREEN: Self
pub const PALE_GREEN: Self
#98FB98 = rgb(152 251 152)
Sourcepub const PALE_TURQUOISE: Self
pub const PALE_TURQUOISE: Self
#AFEEEE = rgb(175 238 238)
Sourcepub const PALE_VIOLET_RED: Self
pub const PALE_VIOLET_RED: Self
#DB7093 = rgb(219 112 147)
Sourcepub const PAPAYAWHIP: Self
pub const PAPAYAWHIP: Self
#FFEFD5 = rgb(255 239 213)
Sourcepub const POWDER_BLUE: Self
pub const POWDER_BLUE: Self
#B0E0E6 = rgb(176 224 230)
Sourcepub const REBECCA_PURPLE: Self
pub const REBECCA_PURPLE: Self
#663399 = rgb(102 51 153)
Sourcepub const ROSY_BROWN: Self
pub const ROSY_BROWN: Self
#BC8F8F = rgb(188 143 143)
Sourcepub const ROYAL_BLUE: Self
pub const ROYAL_BLUE: Self
#4169E1 = rgb(65 105 225)
Sourcepub const SADDLE_BROWN: Self
pub const SADDLE_BROWN: Self
#8B4513 = rgb(139 69 19)
Sourcepub const SANDY_BROWN: Self
pub const SANDY_BROWN: Self
#F4A460 = rgb(244 164 96)
Sourcepub const SLATE_BLUE: Self
pub const SLATE_BLUE: Self
#6A5ACD = rgb(106 90 205)
Sourcepub const SLATE_GRAY: Self
pub const SLATE_GRAY: Self
#708090 = rgb(112 128 144)
Sourcepub const SLATE_GREY: Self
pub const SLATE_GREY: Self
#708090 = rgb(112 128 144)
Sourcepub const SPRING_GREEN: Self
pub const SPRING_GREEN: Self
#00FF7F = rgb(0 255 127)
Sourcepub const STEEL_BLUE: Self
pub const STEEL_BLUE: Self
#4682B4 = rgb(70 130 180)
Sourcepub const WHITE_SMOKE: Self
pub const WHITE_SMOKE: Self
#F5F5F5 = rgb(245 245 245)
Sourcepub const YELLOW_GREEN: Self
pub const YELLOW_GREEN: Self
#9ACD32 = rgb(154 205 50)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Color
impl<'de> Deserialize<'de> for Color
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
impl Copy for Color
impl Eq 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 UnwindSafe for Color
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Source§fn into_color(self) -> U
fn into_color(self) -> U
Source§impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Source§fn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.Source§impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Source§fn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
OutOfBounds
error is returned which contains
the unclamped color. Read more