[−][src]Trait prisma::color_space::ColorSpace
A color space that allows moving from device-dependent to device-independent spaces and back
A color space is defined by red, green and blue primaries in xy chromaticity space, and a white point in XYZ space. These values are used to compute a 3x3 transformation matrix on computation which is cached and used for all conversion operations.
Associated Types
type Encoding: ColorEncoding
The standard encoding used by this color space
Required methods
fn red_primary(&self) -> RgbPrimary<T>
Returns the red primary of the color space
fn green_primary(&self) -> RgbPrimary<T>
Returns the green primary of the color space
fn blue_primary(&self) -> RgbPrimary<T>
Returns the blue primary of the color space
fn white_point(&self) -> Xyz<T>
Returns the white point of the color space
fn encoding(&self) -> Self::Encoding
Returns standard the encoding used by the color space
fn get_xyz_transform(&self) -> Matrix3<T>
Returns the computed RGB -> XYZ matrix
fn get_inverse_xyz_transform(&self) -> Matrix3<T>
Returns the computed XYZ -> RGB matrix
fn apply_transform(&self, vec: (T, T, T)) -> (T, T, T)
Apply the forward transform to a 3-vector
Implementations on Foreign Types
impl<T, E> ColorSpace<T> for Rc<EncodedColorSpace<T, E>> where
T: Float + FreeChannelScalar + PosNormalChannelScalar,
E: ColorEncoding,
[src]
T: Float + FreeChannelScalar + PosNormalChannelScalar,
E: ColorEncoding,
type Encoding = E
fn red_primary(&self) -> RgbPrimary<T>
[src]
fn green_primary(&self) -> RgbPrimary<T>
[src]
fn blue_primary(&self) -> RgbPrimary<T>
[src]
fn white_point(&self) -> Xyz<T>
[src]
fn encoding(&self) -> Self::Encoding
[src]
fn get_xyz_transform(&self) -> Matrix3<T>
[src]
fn get_inverse_xyz_transform(&self) -> Matrix3<T>
[src]
fn apply_transform(&self, vec: (T, T, T)) -> (T, T, T)
[src]
impl<T, E> ColorSpace<T> for Arc<EncodedColorSpace<T, E>> where
T: Float + FreeChannelScalar + PosNormalChannelScalar,
E: ColorEncoding,
[src]
T: Float + FreeChannelScalar + PosNormalChannelScalar,
E: ColorEncoding,
type Encoding = E
fn red_primary(&self) -> RgbPrimary<T>
[src]
fn green_primary(&self) -> RgbPrimary<T>
[src]
fn blue_primary(&self) -> RgbPrimary<T>
[src]
fn white_point(&self) -> Xyz<T>
[src]
fn encoding(&self) -> Self::Encoding
[src]
fn get_xyz_transform(&self) -> Matrix3<T>
[src]
fn get_inverse_xyz_transform(&self) -> Matrix3<T>
[src]
fn apply_transform(&self, vec: (T, T, T)) -> (T, T, T)
[src]
Implementors
impl<'a, T, E> ColorSpace<T> for &'a EncodedColorSpace<T, E> where
T: Float + FreeChannelScalar + PosNormalChannelScalar,
E: ColorEncoding,
[src]
T: Float + FreeChannelScalar + PosNormalChannelScalar,
E: ColorEncoding,
type Encoding = E
fn red_primary(&self) -> RgbPrimary<T>
[src]
fn green_primary(&self) -> RgbPrimary<T>
[src]
fn blue_primary(&self) -> RgbPrimary<T>
[src]
fn white_point(&self) -> Xyz<T>
[src]
fn encoding(&self) -> Self::Encoding
[src]
fn get_xyz_transform(&self) -> Matrix3<T>
[src]
fn get_inverse_xyz_transform(&self) -> Matrix3<T>
[src]
fn apply_transform(&self, vec: (T, T, T)) -> (T, T, T)
[src]
impl<T> ColorSpace<T> for SRgb<T> where
T: Float + FreeChannelScalar + PosNormalChannelScalar,
[src]
T: Float + FreeChannelScalar + PosNormalChannelScalar,
type Encoding = SrgbEncoding
fn red_primary(&self) -> RgbPrimary<T>
[src]
fn green_primary(&self) -> RgbPrimary<T>
[src]
fn blue_primary(&self) -> RgbPrimary<T>
[src]
fn white_point(&self) -> Xyz<T>
[src]
fn get_xyz_transform(&self) -> Matrix3<T>
[src]
fn get_inverse_xyz_transform(&self) -> Matrix3<T>
[src]
fn encoding(&self) -> Self::Encoding
[src]
fn apply_transform(&self, vec: (T, T, T)) -> (T, T, T)
[src]
impl<T, E> ColorSpace<T> for EncodedColorSpace<T, E> where
T: Float + FreeChannelScalar + PosNormalChannelScalar,
E: ColorEncoding,
[src]
T: Float + FreeChannelScalar + PosNormalChannelScalar,
E: ColorEncoding,