Struct random_color::RandomColor
[−]
[src]
pub struct RandomColor { pub hue: Option<ColorInformation>, pub luminosity: Option<Luminosity>, pub seed: Option<i32>, pub alpha: Option<f32>, }
Fields
hue: Option<ColorInformation>
Can take values of Color
enum.
luminosity: Option<Luminosity>
Can take values of Luminosity
enum.
seed: Option<i32>
Can take any value of i32
.
alpha: Option<f32>
Can take values f32
from 0 to 1.
Methods
impl RandomColor
[src]
fn new() -> RandomColor
[src]
Generates a new RandomColor
fn hue(&mut self, hue: Color) -> &mut RandomColor
[src]
Sets RandomColor.hue
colorspace.
fn luminosity(&mut self, luminosity: Luminosity) -> &mut RandomColor
[src]
Sets RandomColor.luminosity
.
fn seed(&mut self, seed: i32) -> &mut RandomColor
[src]
Sets RandomColor.seed
used to generate a color.
fn alpha(&mut self, alpha: f32) -> &mut RandomColor
[src]
Sets RandomColor.aplha
.
fn to_hsv_array(&self) -> [u32; 3]
[src]
fn to_rgb_string(&self) -> String
[src]
fn to_rgba_string(&self) -> String
[src]
fn to_rgb_array(&self) -> [u32; 3]
[src]
fn to_hsl_string(&self) -> String
[src]
fn to_hsla_string(&self) -> String
[src]
fn to_hsl_array(&self) -> [u32; 3]
[src]
fn to_hex(&self) -> String
[src]
Trait Implementations
impl Debug for RandomColor
[src]
impl PartialEq for RandomColor
[src]
fn eq(&self, __arg_0: &RandomColor) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &RandomColor) -> bool
[src]
This method tests for !=
.