Struct graphics_style::Color
source · [−]pub struct Color(_);Expand description
A color with red, green, blue, and alpha channel.
Implementations
sourceimpl Color
impl Color
sourcepub const ALICE_BLUE: Self = Self::new(240, 248, 255, 255)
pub const ALICE_BLUE: Self = Self::new(240, 248, 255, 255)
#F0F8FF = rgb(240 248 255)
sourcepub const ANTIQUE_WHITE: Self = Self::new(250, 235, 215, 255)
pub const ANTIQUE_WHITE: Self = Self::new(250, 235, 215, 255)
#FAEBD7 = rgb(250 235 215)
sourcepub const AQUA_MARINE: Self = Self::new(127, 255, 212, 255)
pub const AQUA_MARINE: Self = Self::new(127, 255, 212, 255)
#7FFFD4 = rgb(127 255 212)
sourcepub const BLANCHEDALMOND: Self = Self::new(255, 235, 205, 255)
pub const BLANCHEDALMOND: Self = Self::new(255, 235, 205, 255)
#FFEBCD = rgb(255 235 205)
sourcepub const BLUE_VIOLET: Self = Self::new(138, 43, 226, 255)
pub const BLUE_VIOLET: Self = Self::new(138, 43, 226, 255)
#8A2BE2 = rgb(138 43 226)
sourcepub const CADET_BLUE: Self = Self::new(95, 158, 160, 255)
pub const CADET_BLUE: Self = Self::new(95, 158, 160, 255)
#5F9EA0 = rgb(95 158 160)
sourcepub const CHARTREUSE: Self = Self::new(127, 255, 0, 255)
pub const CHARTREUSE: Self = Self::new(127, 255, 0, 255)
#7FFF00 = rgb(127 255 0)
sourcepub const CORNFLOWER_BLUE: Self = Self::new(100, 149, 237, 255)
pub const CORNFLOWER_BLUE: Self = Self::new(100, 149, 237, 255)
#6495ED = rgb(100 149 237)
sourcepub const DARK_GOLDENROD: Self = Self::new(184, 134, 11, 255)
pub const DARK_GOLDENROD: Self = Self::new(184, 134, 11, 255)
#B8860B = rgb(184 134 11)
sourcepub const DARK_GREEN: Self = Self::new(0, 100, 0, 255)
pub const DARK_GREEN: Self = Self::new(0, 100, 0, 255)
#006400 = rgb(0 100 0)
sourcepub const DARK_KHAKI: Self = Self::new(189, 183, 107, 255)
pub const DARK_KHAKI: Self = Self::new(189, 183, 107, 255)
#BDB76B = rgb(189 183 107)
sourcepub const DARK_MAGENTA: Self = Self::new(139, 0, 139, 255)
pub const DARK_MAGENTA: Self = Self::new(139, 0, 139, 255)
#8B008B = rgb(139 0 139)
sourcepub const DARK_OLIVE_GREEN: Self = Self::new(85, 107, 47, 255)
pub const DARK_OLIVE_GREEN: Self = Self::new(85, 107, 47, 255)
#556B2F = rgb(85 107 47)
sourcepub const DARK_ORANGE: Self = Self::new(255, 140, 0, 255)
pub const DARK_ORANGE: Self = Self::new(255, 140, 0, 255)
#FF8C00 = rgb(255 140 0)
sourcepub const DARK_ORCHID: Self = Self::new(153, 50, 204, 255)
pub const DARK_ORCHID: Self = Self::new(153, 50, 204, 255)
#9932CC = rgb(153 50 204)
sourcepub const DARK_SALMON: Self = Self::new(233, 150, 122, 255)
pub const DARK_SALMON: Self = Self::new(233, 150, 122, 255)
#E9967A = rgb(233 150 122)
sourcepub const DARK_SEAGREEN: Self = Self::new(143, 188, 143, 255)
pub const DARK_SEAGREEN: Self = Self::new(143, 188, 143, 255)
#8FBC8F = rgb(143 188 143)
sourcepub const DARK_SLATE_BLUE: Self = Self::new(72, 61, 139, 255)
pub const DARK_SLATE_BLUE: Self = Self::new(72, 61, 139, 255)
#483D8B = rgb(72 61 139)
sourcepub const DARK_SLATEGRAY: Self = Self::new(47, 79, 79, 255)
pub const DARK_SLATEGRAY: Self = Self::new(47, 79, 79, 255)
#2F4F4F = rgb(47 79 79)
sourcepub const DARK_SLATEGREY: Self = Self::new(47, 79, 79, 255)
pub const DARK_SLATEGREY: Self = Self::new(47, 79, 79, 255)
#2F4F4F = rgb(47 79 79)
sourcepub const DARK_TURQUOISE: Self = Self::new(0, 206, 209, 255)
pub const DARK_TURQUOISE: Self = Self::new(0, 206, 209, 255)
#00CED1 = rgb(0 206 209)
sourcepub const DARK_VIOLET: Self = Self::new(148, 0, 211, 255)
pub const DARK_VIOLET: Self = Self::new(148, 0, 211, 255)
#9400D3 = rgb(148 0 211)
sourcepub const DEEP_SKYBLUE: Self = Self::new(0, 191, 255, 255)
pub const DEEP_SKYBLUE: Self = Self::new(0, 191, 255, 255)
#00BFFF = rgb(0 191 255)
sourcepub const DODGER_BLUE: Self = Self::new(30, 144, 255, 255)
pub const DODGER_BLUE: Self = Self::new(30, 144, 255, 255)
#1E90FF = rgb(30 144 255)
sourcepub const FLORAL_WHITE: Self = Self::new(255, 250, 240, 255)
pub const FLORAL_WHITE: Self = Self::new(255, 250, 240, 255)
#FFFAF0 = rgb(255 250 240)
sourcepub const FORESTGREEN: Self = Self::new(34, 139, 34, 255)
pub const FORESTGREEN: Self = Self::new(34, 139, 34, 255)
#228B22 = rgb(34 139 34)
sourcepub const GHOST_WHITE: Self = Self::new(248, 248, 255, 255)
pub const GHOST_WHITE: Self = Self::new(248, 248, 255, 255)
#F8F8FF = rgb(248 248 255)
sourcepub const GOLDEN_ROD: Self = Self::new(218, 165, 32, 255)
pub const GOLDEN_ROD: Self = Self::new(218, 165, 32, 255)
#DAA520 = rgb(218 165 32)
sourcepub const GREEN_YELLOW: Self = Self::new(173, 255, 47, 255)
pub const GREEN_YELLOW: Self = Self::new(173, 255, 47, 255)
#ADFF2F = rgb(173 255 47)
sourcepub const LAVENDERBLUSH: Self = Self::new(255, 240, 245, 255)
pub const LAVENDERBLUSH: Self = Self::new(255, 240, 245, 255)
#FFF0F5 = rgb(255 240 245)
sourcepub const LAWN_GREEN: Self = Self::new(124, 252, 0, 255)
pub const LAWN_GREEN: Self = Self::new(124, 252, 0, 255)
#7CFC00 = rgb(124 252 0)
sourcepub const LEMON_CHIFFON: Self = Self::new(255, 250, 205, 255)
pub const LEMON_CHIFFON: Self = Self::new(255, 250, 205, 255)
#FFFACD = rgb(255 250 205)
sourcepub const LIGHT_BLUE: Self = Self::new(173, 216, 230, 255)
pub const LIGHT_BLUE: Self = Self::new(173, 216, 230, 255)
#ADD8E6 = rgb(173 216 230)
sourcepub const LIGHT_CORAL: Self = Self::new(240, 128, 128, 255)
pub const LIGHT_CORAL: Self = Self::new(240, 128, 128, 255)
#F08080 = rgb(240 128 128)
sourcepub const LIGHT_CYAN: Self = Self::new(224, 255, 255, 255)
pub const LIGHT_CYAN: Self = Self::new(224, 255, 255, 255)
#E0FFFF = rgb(224 255 255)
sourcepub const LIGHT_GOLDEN_ROD_YELLOW: Self = Self::new(250, 250, 210, 255)
pub const LIGHT_GOLDEN_ROD_YELLOW: Self = Self::new(250, 250, 210, 255)
#FAFAD2 = rgb(250 250 210)
sourcepub const LIGHT_GRAY: Self = Self::new(211, 211, 211, 255)
pub const LIGHT_GRAY: Self = Self::new(211, 211, 211, 255)
#D3D3D3 = rgb(211 211 211)
sourcepub const LIGHT_GREEN: Self = Self::new(144, 238, 144, 255)
pub const LIGHT_GREEN: Self = Self::new(144, 238, 144, 255)
#90EE90 = rgb(144 238 144)
sourcepub const LIGHT_GREY: Self = Self::new(211, 211, 211, 255)
pub const LIGHT_GREY: Self = Self::new(211, 211, 211, 255)
#D3D3D3 = rgb(211 211 211)
sourcepub const LIGHT_PINK: Self = Self::new(255, 182, 193, 255)
pub const LIGHT_PINK: Self = Self::new(255, 182, 193, 255)
#FFB6C1 = rgb(255 182 193)
sourcepub const LIGHT_SALMON: Self = Self::new(255, 160, 122, 255)
pub const LIGHT_SALMON: Self = Self::new(255, 160, 122, 255)
#FFA07A = rgb(255 160 122)
sourcepub const LIGHT_SEA_GREEN: Self = Self::new(32, 178, 170, 255)
pub const LIGHT_SEA_GREEN: Self = Self::new(32, 178, 170, 255)
#20B2AA = rgb(32 178 170)
sourcepub const LIGHT_SKY_BLUE: Self = Self::new(135, 206, 250, 255)
pub const LIGHT_SKY_BLUE: Self = Self::new(135, 206, 250, 255)
#87CEFA = rgb(135 206 250)
sourcepub const LIGHT_SLATE_GRAY: Self = Self::new(119, 136, 153, 255)
pub const LIGHT_SLATE_GRAY: Self = Self::new(119, 136, 153, 255)
#778899 = rgb(119 136 153)
sourcepub const LIGHT_SLATE_GREY: Self = Self::new(119, 136, 153, 255)
pub const LIGHT_SLATE_GREY: Self = Self::new(119, 136, 153, 255)
#778899 = rgb(119 136 153)
sourcepub const LIGHT_STEEL_BLUE: Self = Self::new(176, 196, 222, 255)
pub const LIGHT_STEEL_BLUE: Self = Self::new(176, 196, 222, 255)
#B0C4DE = rgb(176 196 222)
sourcepub const LIGHT_YELLOW: Self = Self::new(255, 255, 224, 255)
pub const LIGHT_YELLOW: Self = Self::new(255, 255, 224, 255)
#FFFFE0 = rgb(255 255 224)
sourcepub const LIME_GREEN: Self = Self::new(50, 205, 50, 255)
pub const LIME_GREEN: Self = Self::new(50, 205, 50, 255)
#32CD32 = rgb(50 205 50)
sourcepub const MEDIUM_AQUA_MARINE: Self = Self::new(102, 205, 170, 255)
pub const MEDIUM_AQUA_MARINE: Self = Self::new(102, 205, 170, 255)
#66CDAA = rgb(102 205 170)
sourcepub const MEDIUM_BLUE: Self = Self::new(0, 0, 205, 255)
pub const MEDIUM_BLUE: Self = Self::new(0, 0, 205, 255)
#0000CD = rgb(0 0 205)
sourcepub const MEDIUM_ORCHID: Self = Self::new(186, 85, 211, 255)
pub const MEDIUM_ORCHID: Self = Self::new(186, 85, 211, 255)
#BA55D3 = rgb(186 85 211)
sourcepub const MEDIUM_PURPLE: Self = Self::new(147, 112, 219, 255)
pub const MEDIUM_PURPLE: Self = Self::new(147, 112, 219, 255)
#9370DB = rgb(147 112 219)
sourcepub const MEDIUM_SEA_GREEN: Self = Self::new(60, 179, 113, 255)
pub const MEDIUM_SEA_GREEN: Self = Self::new(60, 179, 113, 255)
#3CB371 = rgb(60 179 113)
sourcepub const MEDIUM_SLATE_BLUE: Self = Self::new(123, 104, 238, 255)
pub const MEDIUM_SLATE_BLUE: Self = Self::new(123, 104, 238, 255)
#7B68EE = rgb(123 104 238)
sourcepub const MEDIUM_SPRING_GREEN: Self = Self::new(0, 250, 154, 255)
pub const MEDIUM_SPRING_GREEN: Self = Self::new(0, 250, 154, 255)
#00FA9A = rgb(0 250 154)
sourcepub const MEDIUM_TURQUOISE: Self = Self::new(72, 209, 204, 255)
pub const MEDIUM_TURQUOISE: Self = Self::new(72, 209, 204, 255)
#48D1CC = rgb(72 209 204)
sourcepub const MEDIUM_VIOLET_RED: Self = Self::new(199, 21, 133, 255)
pub const MEDIUM_VIOLET_RED: Self = Self::new(199, 21, 133, 255)
#C71585 = rgb(199 21 133)
sourcepub const MIDNIGHT_BLUE: Self = Self::new(25, 25, 112, 255)
pub const MIDNIGHT_BLUE: Self = Self::new(25, 25, 112, 255)
#191970 = rgb(25 25 112)
sourcepub const NAVAJO_WHITE: Self = Self::new(255, 222, 173, 255)
pub const NAVAJO_WHITE: Self = Self::new(255, 222, 173, 255)
#FFDEAD = rgb(255 222 173)
sourcepub const PALE_GOLDEN_ROD: Self = Self::new(238, 232, 170, 255)
pub const PALE_GOLDEN_ROD: Self = Self::new(238, 232, 170, 255)
#EEE8AA = rgb(238 232 170)
sourcepub const PALE_GREEN: Self = Self::new(152, 251, 152, 255)
pub const PALE_GREEN: Self = Self::new(152, 251, 152, 255)
#98FB98 = rgb(152 251 152)
sourcepub const PALE_TURQUOISE: Self = Self::new(175, 238, 238, 255)
pub const PALE_TURQUOISE: Self = Self::new(175, 238, 238, 255)
#AFEEEE = rgb(175 238 238)
sourcepub const PALE_VIOLET_RED: Self = Self::new(219, 112, 147, 255)
pub const PALE_VIOLET_RED: Self = Self::new(219, 112, 147, 255)
#DB7093 = rgb(219 112 147)
sourcepub const PAPAYAWHIP: Self = Self::new(255, 239, 213, 255)
pub const PAPAYAWHIP: Self = Self::new(255, 239, 213, 255)
#FFEFD5 = rgb(255 239 213)
sourcepub const POWDER_BLUE: Self = Self::new(176, 224, 230, 255)
pub const POWDER_BLUE: Self = Self::new(176, 224, 230, 255)
#B0E0E6 = rgb(176 224 230)
sourcepub const REBECCA_PURPLE: Self = Self::new(102, 51, 153, 255)
pub const REBECCA_PURPLE: Self = Self::new(102, 51, 153, 255)
#663399 = rgb(102 51 153)
sourcepub const ROSY_BROWN: Self = Self::new(188, 143, 143, 255)
pub const ROSY_BROWN: Self = Self::new(188, 143, 143, 255)
#BC8F8F = rgb(188 143 143)
sourcepub const ROYAL_BLUE: Self = Self::new(65, 105, 225, 255)
pub const ROYAL_BLUE: Self = Self::new(65, 105, 225, 255)
#4169E1 = rgb(65 105 225)
sourcepub const SADDLE_BROWN: Self = Self::new(139, 69, 19, 255)
pub const SADDLE_BROWN: Self = Self::new(139, 69, 19, 255)
#8B4513 = rgb(139 69 19)
sourcepub const SANDY_BROWN: Self = Self::new(244, 164, 96, 255)
pub const SANDY_BROWN: Self = Self::new(244, 164, 96, 255)
#F4A460 = rgb(244 164 96)
sourcepub const SLATE_BLUE: Self = Self::new(106, 90, 205, 255)
pub const SLATE_BLUE: Self = Self::new(106, 90, 205, 255)
#6A5ACD = rgb(106 90 205)
sourcepub const SLATE_GRAY: Self = Self::new(112, 128, 144, 255)
pub const SLATE_GRAY: Self = Self::new(112, 128, 144, 255)
#708090 = rgb(112 128 144)
sourcepub const SLATE_GREY: Self = Self::new(112, 128, 144, 255)
pub const SLATE_GREY: Self = Self::new(112, 128, 144, 255)
#708090 = rgb(112 128 144)
sourcepub const SPRING_GREEN: Self = Self::new(0, 255, 127, 255)
pub const SPRING_GREEN: Self = Self::new(0, 255, 127, 255)
#00FF7F = rgb(0 255 127)
sourcepub const STEEL_BLUE: Self = Self::new(70, 130, 180, 255)
pub const STEEL_BLUE: Self = Self::new(70, 130, 180, 255)
#4682B4 = rgb(70 130 180)
sourcepub const WHITE_SMOKE: Self = Self::new(245, 245, 245, 255)
pub const WHITE_SMOKE: Self = Self::new(245, 245, 245, 255)
#F5F5F5 = rgb(245 245 245)
sourcepub const YELLOW_GREEN: Self = Self::new(154, 205, 50, 255)
pub const YELLOW_GREEN: Self = Self::new(154, 205, 50, 255)
#9ACD32 = rgb(154 205 50)
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Color
impl<'de> Deserialize<'de> for Color
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Color
impl Eq for Color
impl StructuralEq for Color
impl StructuralPartialEq for Color
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
sourceimpl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
sourcefn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified method Read more
sourcefn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford method by default Read more
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T, U> IntoColor<U> for T where
U: FromColor<T>,
impl<T, U> IntoColor<U> for T where
U: FromColor<T>,
sourcefn into_color(self) -> U
fn into_color(self) -> U
Convert into T with values clamped to the color defined bounds Read more
sourceimpl<T, U> IntoColorUnclamped<U> for T where
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for T where
U: FromColorUnclamped<T>,
sourcefn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<R, P> ReadPrimitive<R> for P where
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for P where
R: Read + ReadEndian<P>,
P: Default,
sourcefn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
sourcefn read_from_big_endian(read: &mut R) -> Result<Self, Error>
fn read_from_big_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
sourcefn read_from_native_endian(read: &mut R) -> Result<Self, Error>
fn read_from_native_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T, U> TryIntoColor<U> for T where
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for T where
U: TryFromColor<T>,
sourcefn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
Convert into T, returning ok if the color is inside of its defined
range, otherwise an OutOfBounds error is returned which contains
the unclamped color. Read more