Struct rofl::Color
[−]
[src]
pub struct Color(pub u8, pub u8, pub u8);
RGB color of the text.
Methods
impl Color
[src]
fn white() -> Self
Create a white color.
fn black() -> Self
Create a black color.
fn gray(value: u8) -> Self
Create a gray color of given intensity.
impl Color
[src]
fn invert(self) -> Self
Convert the color to its chromatic inverse.
Trait Implementations
impl<'de> Deserialize<'de> for Color
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl FromStr for Color
[src]
type Err = ColorParseError
The associated error which can be returned from parsing.
fn from_str(v: &str) -> Result<Self, Self::Err>
Parses a string s
to return a value of this type. Read more
impl Clone for Color
[src]
fn clone(&self) -> Color
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for Color
[src]
impl Debug for Color
[src]
impl PartialEq for Color
[src]
fn eq(&self, __arg_0: &Color) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Color) -> bool
This method tests for !=
.
impl Eq for Color
[src]
impl Hash for Color
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more