Function rgbToCmyk

  • Converts RGB values to CMYK values.

    Parameters

    • rgb: RGB

      An object with r, g, and b properties.

    Returns CMYK

    An object with c, m, y, and k properties.

    If the input is not a valid RGB object or if RGB values are out of range.