def rgbToCMYK(r, g, b):
    """
    Converts RGB to CMYK
    :param r: red value (from 0.0 to 1.0)
    :param g: green value (from 0.0 to 1.0)
    :param b: blue value (from 0.0 to 1.0)
    :return: tuple containing CMYK color values (from 0.0 to 1.0 each)
    """
    k = 1-max([r,g,b])
    c = (1-r-k)/(1-k)
    m = (1-g-k)/(1-k)
    y = (1-b-k)/(1-k)
    return c,m,y,k