palette::rgb

Trait RgbSpace

source
pub trait RgbSpace {
    type Primaries;
    type WhitePoint;

    // Provided methods
    fn rgb_to_xyz_matrix() -> Option<Mat3<f64>> { ... }
    fn xyz_to_rgb_matrix() -> Option<Mat3<f64>> { ... }
}
Expand description

A set of primaries and a white point.

Required Associated Types§

source

type Primaries

The primaries of the RGB color space.

source

type WhitePoint

The white point of the RGB color space.

Provided Methods§

source

fn rgb_to_xyz_matrix() -> Option<Mat3<f64>>

Get a pre-defined matrix for converting an RGB value with this standard into an XYZ value.

Returning None (as in the default implementation) means that the matrix will be computed dynamically, which is significantly slower.

source

fn xyz_to_rgb_matrix() -> Option<Mat3<f64>>

Get a pre-defined matrix for converting an XYZ value into an RGB value with this standard.

Returning None (as in the default implementation) means that the matrix will be computed dynamically, which is significantly slower.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<P, W> RgbSpace for (P, W)

Implementors§