pub fn to_cmyk(&self) -> CMYK {
        let rgba = self.to_rgba();
        let r = (rgba.r as f64) / 255.0;
        let g = (rgba.g as f64) / 255.0;
        let b = (rgba.b as f64) / 255.0;
        let biggest = if r >= g && r >= b {
            r
        } else if g >= r && g >= b {
            g
        } else {
            b
        };
        let k = 1.0 - biggest;
        let c = (1.0 - r - k) / biggest;
        let m = (1.0 - g - k) / biggest;
        let y = (1.0 - b - k) / biggest;

        CMYK {
            c: if c.is_nan() { 0.0 } else { c },
            m: if m.is_nan() { 0.0 } else { m },
            y: if y.is_nan() { 0.0 } else { y },
            k: k,
        }
    }
/// Convert a `Color` to its cyan, magenta, yellow, and black values. The CMYK
/// values are floats smaller than or equal to 1.0.
Convert a `Color` to its cyan, magenta, yellow, and black values. The CMYK
values are floats smaller than or equal to 1.0.
Convert a ` Color ` to its cyan magenta yellow and black values . The CMYK values are floats smaller than or equal to 1 . 0 .
pub fn to_cmyk(&self) -> CMYK {
        let rgba = self.to_rgba();
        let r = (rgba.r as f64) / 255.0;
        let g = (rgba.g as f64) / 255.0;
        let b = (rgba.b as f64) / 255.0;
        let biggest = if r >= g && r >= b {
            r
        } else if g >= r && g >= b {
            g
        } else {
            b
        };
        let k = 1.0 - biggest;
        let c = (1.0 - r - k) / biggest;
        let m = (1.0 - g - k) / biggest;
        let y = (1.0 - b - k) / biggest;
        CMYK {
            c: if c.is_nan() { 0.0 } else { c },
            m: if m.is_nan() { 0.0 } else { m },
            y: if y.is_nan() { 0.0 } else { y },
            k: k,
        }
    }
pub fn to_cmyk ( & self ) -> CMYK { let rgba = self . to_rgba ( ) ; let r = ( rgba . r as f64 ) / 255.0 ; let g = ( rgba . g as f64 ) / 255.0 ; let b = ( rgba . b as f64 ) / 255.0 ; let biggest = if r >= g && r >= b { r } else if g >= r && g >= b { g } else { b } ; let k = 1.0 - biggest ; let c = ( 1.0 - r - k ) / biggest ; let m = ( 1.0 - g - k ) / biggest ; let y = ( 1.0 - b - k ) / biggest ; CMYK { c : if c . is_nan ( ) { 0.0 } else { c } , m : if m . is_nan ( ) { 0.0 } else { m } , y : if y . is_nan ( ) { 0.0 } else { y } , k : k , } }
Convert a `Color` to its cyan, magenta, yellow, and black values.
Convert a ` Color ` to its cyan magenta yellow and black values .
&self
&self