Skip to content

CMYK

The CMYK color space is not registered in Color by default

Properties

Name: cmyk

White Point: D65 / 2˚

Coordinates:

Name Range*
c [0, 1]
m [0, 1]
y [0, 1]
k [0, 1]

* Range denotes in gamut colors, but the color space supports an extended range beyond the gamut.

The CMYK color model is a just like CMY except that it adds an additional channel k to control blackness.

The CMYK color space, as ColorAide Extras has chosen to implement it, is directly calculated from the sRGB color space, and as such, is based off the sRGB primaries.

Learn more.

Channel Aliases

Channels Aliases
c cyan
m magenta
y yellow
k black

Input/Output

CMY is not currently supported in the CSS spec, the parsed input and string output formats use the color() function format using the custom name --cmyk:

color(--cmyk c m y k / a)  // Color function

The string representation of the color object and the default string output use the color(--cmyk c m y k / a) form.

>>> Color("cmyk", [0, 1, 1, 0])
color(--cmyk 0 1 1 0 / 1)
>>> Color("cmyk", [0, 0.35294, 1, 0]).to_string()
'color(--cmyk 0 0.35294 1 0)'

Registering

from coloraide import Color as Base
from coloraide.spaces.cmyk import CMYK

class Color(Base): ...

Color.register(CMYK())