Trait carbide_core::color::Colorable[][src]

pub trait Colorable: Sized {
    fn color(self, color: Color) -> Self;

    fn rgba(self, r: f32, g: f32, b: f32, a: f32) -> Self { ... }
fn rgb(self, r: f32, g: f32, b: f32) -> Self { ... }
fn hsla(self, h: f32, s: f32, l: f32, a: f32) -> Self { ... }
fn hsl(self, h: f32, s: f32, l: f32) -> Self { ... } }

Types that can be colored.

Required methods

fn color(self, color: Color) -> Self[src]

Set the color of the widget.

Loading content...

Provided methods

fn rgba(self, r: f32, g: f32, b: f32, a: f32) -> Self[src]

Set the color of the widget from rgba values.

fn rgb(self, r: f32, g: f32, b: f32) -> Self[src]

Set the color of the widget from rgb values.

fn hsla(self, h: f32, s: f32, l: f32, a: f32) -> Self[src]

Set the color of the widget from hsla values.

fn hsl(self, h: f32, s: f32, l: f32) -> Self[src]

Set the color of the widget from hsl values.

Loading content...

Implementors

Loading content...