Enum flo_canvas::Color
[−]
[src]
pub enum Color { Rgba(f32, f32, f32, f32), Hsluv(f32, f32, f32, f32), }
Representation of a colour
Variants
Rgba(f32, f32, f32, f32)
Hsluv(f32, f32, f32, f32)
Methods
impl Color
[src]
pub fn to_rgba_components(&self) -> (f32, f32, f32, f32)
[src]
Returns this colour as RGBA components
pub fn to_hsluv_components(&self) -> (f32, f32, f32, f32)
[src]
Returns this colour as HSLUV components
pub fn to_format(&self, format: ColorFormat) -> Color
[src]
Converts this colour to another format
pub fn with_alpha(&self, new_alpha: f32) -> Color
[src]
Returns a new colour that's the same as this one except with a different alpha value
Trait Implementations
impl Clone for Color
[src]
fn clone(&self) -> Color
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Color
[src]
impl PartialEq for Color
[src]
fn eq(&self, __arg_0: &Color) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Color) -> bool
[src]
This method tests for !=
.
impl Debug for Color
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl CanvasEncoding<String> for Color
[src]
fn encode_canvas(&self, append_to: &mut String)
[src]
Encodes this item by appending it to the specified string Read more