pub trait IntoColor<T> {
    fn into_color(self) -> T;
Expand description

A trait for converting a color into another, in a possibly lossy way.

U: IntoColor<T> is implemented for every type T: FromColor<U>.

See FromColor for more details.

Required Methods

Convert into T with values clamped to the color defined bounds

use palette::{Clamp, IntoColor, Lch, Srgb};

let rgb: Srgb = Lch::new(50.0, 100.0, -175.0).into_color();