colorparser_css

Trait ColorspaceImpl

Source
pub trait ColorspaceImpl {
    // Required methods
    fn to_rgba(&self) -> Rgba;
    fn to_rgba16(&self) -> Rgba16;
    fn to_normalized_rgba(&self) -> NormalizedRgba;
    fn to_hsla(&self) -> Hsla;
    fn to_normalized_hsla(&self) -> NormalizedHsla;
    fn darken(&self, percentage: f32) -> Self;
    fn lighten(&self, percentage: f32) -> Self;
}

Required Methods§

Source

fn to_rgba(&self) -> Rgba

Source

fn to_rgba16(&self) -> Rgba16

Source

fn to_normalized_rgba(&self) -> NormalizedRgba

Source

fn to_hsla(&self) -> Hsla

Source

fn to_normalized_hsla(&self) -> NormalizedHsla

Source

fn darken(&self, percentage: f32) -> Self

Source

fn lighten(&self, percentage: f32) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§