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, however, the end result is likely to be different from the printed result.
device-cmyk(0 81% 81% 30%); device-cmyk(0 81% 81% 30% / .5); device-cmyk(0 81% 81% 30% / .5, rgb(178 34 34));
Functional notation: device-cmyk(C M Y K[ / A][, color])
C, M, Y, K<number> or <percentage> values providing the cyan, magenta, yellow, and black components of CMYK color.
A OptionalAn <alpha-value>, where the number 1 corresponds to 100% (full opacity).
color OptionalAn optional fallback <color> to use if the user agent does not know how to translate the CMYK color to RGB.
<device-cmyk()> =
<legacy-device-cmyk-syntax> |
<modern-device-cmyk-syntax>
<legacy-device-cmyk-syntax> =
device-cmyk( <number>#{4} )
<modern-device-cmyk-syntax> =
device-cmyk( <cmyk-component>{4} [ / [ <alpha-value> | none ] ]? )
<cmyk-component> =
<number> |
<percentage> |
none
<alpha-value> =
<number> |
<percentage>
| Specification |
|---|
| CSS Color Module Level 5> # device-cmyk> |
Currently, no browsers support this feature.
@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/color_value/device-cmyk