`device-cmyk()` CSS function
The device-cmyk() functional notation is used to express CMYK colors in a device dependent way, specifying the cyan, magenta, yellow, and black components.
This approach to color is useful when creating material to be output to a particular printer, when the output for particular ink combinations is known. CSS processors may attempt to approximate the color for other media; however, the end result is likely to be different from the printed result without knowing the precise output colorimetry. A @color-profile declaration for device-cmyk can specify the exact color profile for conversion.
Syntax
device-cmyk(0 81% 81% 30%); device-cmyk(none 0.81 0.81 0.3); device-cmyk(0 81% 81% 30% / .5);
Values
Functional notation: device-cmyk(C M Y K[ / A])
-
C,M,Y,K - Each a
<number>between0and1, a<percentage>between0%and100%, or the keywordnoneproviding the cyan, magenta, yellow, and black components of CMYK color.Note: See Missing color components for more information on the effect of
none. -
AOptional - An
<alpha-value>representing the alpha channel value of the color, where the number0corresponds to0%(fully transparent) and1corresponds to100%(fully opaque). Additionally, the keywordnonecan be used to explicitly specify no alpha channel.
Formal syntax
Specifications
| Specification |
|---|
| CSS Color Module Level 5 # device-cmyk |
Browser compatibility
Currently, no browsers support this feature.
See also
- CSS colors module
@page
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/color_value/device-cmyk