pub fn to_xyz(&self) -> XYZ {
        #![allow(clippy::many_single_char_names)]
        let finv = |c_| {
            if c_ <= 0.04045 {
                c_ / 12.92
            } else {
                Scalar::powf((c_ + 0.055) / 1.055, 2.4)
            }
        };

        let rec = self.to_rgba_float();
        let r = finv(rec.r);
        let g = finv(rec.g);
        let b = finv(rec.b);

        let x = 0.4124 * r + 0.3576 * g + 0.1805 * b;
        let y = 0.2126 * r + 0.7152 * g + 0.0722 * b;
        let z = 0.0193 * r + 0.1192 * g + 0.9505 * b;

        XYZ {
            x,
            y,
            z,
            alpha: self.alpha,
        }
    }
/// Get XYZ coordinates according to the CIE 1931 color space.
///
/// See:
/// - https://en.wikipedia.org/wiki/CIE_1931_color_space
/// - https://en.wikipedia.org/wiki/SRGB
Get XYZ coordinates according to the CIE 1931 color space.
Get XYZ coordinates according to the CIE 1931 color space .
pub fn to_xyz(&self) -> XYZ {
        #![allow(clippy::many_single_char_names)]
        let finv = |c_| {
            if c_ <= 0.04045 {
                c_ / 12.92
            } else {
                Scalar::powf((c_ + 0.055) / 1.055, 2.4)
            }
        };
        let rec = self.to_rgba_float();
        let r = finv(rec.r);
        let g = finv(rec.g);
        let b = finv(rec.b);
        let x = 0.4124 * r + 0.3576 * g + 0.1805 * b;
        let y = 0.2126 * r + 0.7152 * g + 0.0722 * b;
        let z = 0.0193 * r + 0.1192 * g + 0.9505 * b;
        XYZ {
            x,
            y,
            z,
            alpha: self.alpha,
        }
    }
pub fn to_xyz ( & self ) -> XYZ { # ! [ allow ( clippy many_single_char_names ) ] let finv = | c_ | { if c_ <= 0.04045 { c_ / 12.92 } else { Scalar :: powf ( ( c_ + 0.055 ) / 1.055 , 2.4 ) } } ; let rec = self . to_rgba_float ( ) ; let r = finv ( rec . r ) ; let g = finv ( rec . g ) ; let b = finv ( rec . b ) ; let x = 0.4124 * r + 0.3576 * g + 0.1805 * b ; let y = 0.2126 * r + 0.7152 * g + 0.0722 * b ; let z = 0.0193 * r + 0.1192 * g + 0.9505 * b ; XYZ { x , y , z , alpha : self . alpha , } }
Get XYZ coordinates according to the CIE 1931 color space.
Get XYZ coordinates according to the CIE 1931 color space .
&self
&self