pub struct Color(/* private fields */);Expand description
A color: a named color such as Color::CRIMSON, a hex or RGB value, a
mix of two colors, or a Token that holds one.
Implementations§
Source§impl Color
impl Color
Sourcepub const ANTIQUEWHITE: Self
pub const ANTIQUEWHITE: Self
The named color antiquewhite.
Sourcepub const AQUAMARINE: Self
pub const AQUAMARINE: Self
The named color aquamarine.
Sourcepub const BLANCHEDALMOND: Self
pub const BLANCHEDALMOND: Self
The named color blanchedalmond.
Sourcepub const BLUEVIOLET: Self
pub const BLUEVIOLET: Self
The named color blueviolet.
Sourcepub const CHARTREUSE: Self
pub const CHARTREUSE: Self
The named color chartreuse.
Sourcepub const CORNFLOWERBLUE: Self
pub const CORNFLOWERBLUE: Self
The named color cornflowerblue.
Sourcepub const DARKGOLDENROD: Self
pub const DARKGOLDENROD: Self
The named color darkgoldenrod.
Sourcepub const DARKMAGENTA: Self
pub const DARKMAGENTA: Self
The named color darkmagenta.
Sourcepub const DARKOLIVEGREEN: Self
pub const DARKOLIVEGREEN: Self
The named color darkolivegreen.
Sourcepub const DARKORANGE: Self
pub const DARKORANGE: Self
The named color darkorange.
Sourcepub const DARKORCHID: Self
pub const DARKORCHID: Self
The named color darkorchid.
Sourcepub const DARKSALMON: Self
pub const DARKSALMON: Self
The named color darksalmon.
Sourcepub const DARKSEAGREEN: Self
pub const DARKSEAGREEN: Self
The named color darkseagreen.
Sourcepub const DARKSLATEBLUE: Self
pub const DARKSLATEBLUE: Self
The named color darkslateblue.
Sourcepub const DARKSLATEGRAY: Self
pub const DARKSLATEGRAY: Self
The named color darkslategray.
Sourcepub const DARKSLATEGREY: Self
pub const DARKSLATEGREY: Self
The named color darkslategrey.
Sourcepub const DARKTURQUOISE: Self
pub const DARKTURQUOISE: Self
The named color darkturquoise.
Sourcepub const DARKVIOLET: Self
pub const DARKVIOLET: Self
The named color darkviolet.
Sourcepub const DEEPSKYBLUE: Self
pub const DEEPSKYBLUE: Self
The named color deepskyblue.
Sourcepub const DODGERBLUE: Self
pub const DODGERBLUE: Self
The named color dodgerblue.
Sourcepub const FLORALWHITE: Self
pub const FLORALWHITE: Self
The named color floralwhite.
Sourcepub const FORESTGREEN: Self
pub const FORESTGREEN: Self
The named color forestgreen.
Sourcepub const GHOSTWHITE: Self
pub const GHOSTWHITE: Self
The named color ghostwhite.
Sourcepub const GREENYELLOW: Self
pub const GREENYELLOW: Self
The named color greenyellow.
Sourcepub const LAVENDERBLUSH: Self
pub const LAVENDERBLUSH: Self
The named color lavenderblush.
Sourcepub const LEMONCHIFFON: Self
pub const LEMONCHIFFON: Self
The named color lemonchiffon.
Sourcepub const LIGHTCORAL: Self
pub const LIGHTCORAL: Self
The named color lightcoral.
Sourcepub const LIGHTGOLDENRODYELLOW: Self
pub const LIGHTGOLDENRODYELLOW: Self
The named color lightgoldenrodyellow.
Sourcepub const LIGHTGREEN: Self
pub const LIGHTGREEN: Self
The named color lightgreen.
Sourcepub const LIGHTSALMON: Self
pub const LIGHTSALMON: Self
The named color lightsalmon.
Sourcepub const LIGHTSEAGREEN: Self
pub const LIGHTSEAGREEN: Self
The named color lightseagreen.
Sourcepub const LIGHTSKYBLUE: Self
pub const LIGHTSKYBLUE: Self
The named color lightskyblue.
Sourcepub const LIGHTSLATEGRAY: Self
pub const LIGHTSLATEGRAY: Self
The named color lightslategray.
Sourcepub const LIGHTSLATEGREY: Self
pub const LIGHTSLATEGREY: Self
The named color lightslategrey.
Sourcepub const LIGHTSTEELBLUE: Self
pub const LIGHTSTEELBLUE: Self
The named color lightsteelblue.
Sourcepub const LIGHTYELLOW: Self
pub const LIGHTYELLOW: Self
The named color lightyellow.
Sourcepub const MEDIUMAQUAMARINE: Self
pub const MEDIUMAQUAMARINE: Self
The named color mediumaquamarine.
Sourcepub const MEDIUMBLUE: Self
pub const MEDIUMBLUE: Self
The named color mediumblue.
Sourcepub const MEDIUMORCHID: Self
pub const MEDIUMORCHID: Self
The named color mediumorchid.
Sourcepub const MEDIUMPURPLE: Self
pub const MEDIUMPURPLE: Self
The named color mediumpurple.
Sourcepub const MEDIUMSEAGREEN: Self
pub const MEDIUMSEAGREEN: Self
The named color mediumseagreen.
Sourcepub const MEDIUMSLATEBLUE: Self
pub const MEDIUMSLATEBLUE: Self
The named color mediumslateblue.
Sourcepub const MEDIUMSPRINGGREEN: Self
pub const MEDIUMSPRINGGREEN: Self
The named color mediumspringgreen.
Sourcepub const MEDIUMTURQUOISE: Self
pub const MEDIUMTURQUOISE: Self
The named color mediumturquoise.
Sourcepub const MEDIUMVIOLETRED: Self
pub const MEDIUMVIOLETRED: Self
The named color mediumvioletred.
Sourcepub const MIDNIGHTBLUE: Self
pub const MIDNIGHTBLUE: Self
The named color midnightblue.
Sourcepub const NAVAJOWHITE: Self
pub const NAVAJOWHITE: Self
The named color navajowhite.
Sourcepub const PALEGOLDENROD: Self
pub const PALEGOLDENROD: Self
The named color palegoldenrod.
Sourcepub const PALETURQUOISE: Self
pub const PALETURQUOISE: Self
The named color paleturquoise.
Sourcepub const PALEVIOLETRED: Self
pub const PALEVIOLETRED: Self
The named color palevioletred.
Sourcepub const PAPAYAWHIP: Self
pub const PAPAYAWHIP: Self
The named color papayawhip.
Sourcepub const POWDERBLUE: Self
pub const POWDERBLUE: Self
The named color powderblue.
Sourcepub const REBECCAPURPLE: Self
pub const REBECCAPURPLE: Self
The named color rebeccapurple.
Sourcepub const SADDLEBROWN: Self
pub const SADDLEBROWN: Self
The named color saddlebrown.
Sourcepub const SANDYBROWN: Self
pub const SANDYBROWN: Self
The named color sandybrown.
Sourcepub const SPRINGGREEN: Self
pub const SPRINGGREEN: Self
The named color springgreen.
Sourcepub const WHITESMOKE: Self
pub const WHITESMOKE: Self
The named color whitesmoke.
Sourcepub const YELLOWGREEN: Self
pub const YELLOWGREEN: Self
The named color yellowgreen.
Source§impl Color
impl Color
Sourcepub const CURRENT_COLOR: Self
pub const CURRENT_COLOR: Self
The element’s color, written currentColor.
Sourcepub const TRANSPARENT: Self
pub const TRANSPARENT: Self
Fully transparent black, written transparent. MDN lists it apart
from the named colors, so the generator does not write it.
Sourcepub fn hex(rgb: u32) -> Self
pub fn hex(rgb: u32) -> Self
The color #rrggbb from the low 24 bits of rgb, as in Color::hex(0xb83f45).
Sourcepub fn rgb(red: u8, green: u8, blue: u8) -> Self
pub fn rgb(red: u8, green: u8, blue: u8) -> Self
The color with red, green, and blue channels from 0 to 255.