pub fn to_cmyk(self) -> (Float, Float, Float, Float) {
        let (c, m, y) = self.tuple();
        let key = c.min(m).min(y);
        let divisor = 1.0 - key;

        if divisor == 0.0 {
            // black
            return (0.0, 0.0, 0.0, 1.0);
        }

        let c = (c - key) / divisor;
        let m = (m - key) / divisor;
        let y = (y - key) / divisor;

        (c, m, y, key)
    }
/// Convert a CMY color to CMYK.
///
/// Unfortunately CMYK can't be represented as a `Color` struct because
/// it has 4 components, so this method returns a 4-tuple.
Convert a CMY color to CMYK.
Unfortunately CMYK can't be represented as a `Color` struct because
it has 4 components, so this method returns a 4-tuple.
Convert a CMY color to CMYK . Unfortunately CMYK can ' t be represented as a ` Color ` struct because it has 4 components so this method returns a 4 - tuple .
pub fn to_cmyk(self) -> (Float, Float, Float, Float) {
        let (c, m, y) = self.tuple();
        let key = c.min(m).min(y);
        let divisor = 1.0 - key;
        if divisor == 0.0 {
            // black
            return (0.0, 0.0, 0.0, 1.0);
        }
        let c = (c - key) / divisor;
        let m = (m - key) / divisor;
        let y = (y - key) / divisor;
        (c, m, y, key)
    }
pub fn to_cmyk ( self ) -> ( Float , Float , Float , Float ) { let ( c , m , y ) = self . tuple ( ) ; let key = c . min ( m ) . min ( y ) ; let divisor = 1.0 - key ; if divisor == 0.0 { // black return ( 0.0 , 0.0 , 0.0 , 1.0 ) ; } let c = ( c - key ) / divisor ; let m = ( m - key ) / divisor ; let y = ( y - key ) / divisor ; ( c , m , y , key ) }
Convert a CMY color to CMYK.
Convert a CMY color to CMYK .
self
self