Trait ColorGamut

Source
pub trait ColorGamut {
    // Required methods
    fn in_gamut(&self) -> bool;
    fn clip(&self) -> Self;
}
Expand description

A trait that colors implement to support gamut mapping.

Required Methods§

Source

fn in_gamut(&self) -> bool

Returns whether the color is within the gamut of the color space.

Source

fn clip(&self) -> Self

Clips the color so that it is within the gamut of the color space.

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§