device-cmyk()
The device-cmyk()
functional notation is used to express CMYK colors in a device independent 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 to the printed result.
Syntax
device-cmyk(0 81% 81% 30%); device-cmyk(0 81% 81% 30% / .5); device-cmyk(0 81% 81% 30% / .5, rgb(178 34 34));
Values
- Functional notation:
device-cmyk( <cmyk-component>{4} [ / <alpha-value> ]? , <color>? )
-
<cmyk-component>
is a list of 4<number>
or<percentage>
values providing the cyan, magenta, yellow, and black components of CMYK color./ <alpha-value>
(alpha) can be a<number>
between0
and1
, or a<percentage>
, where the number1
corresponds to100%
(full opacity).<color>
is an optional fallback<color>
to use if the user agent does not know how to translate the CMYK color to RGB.
Specifications
No specification data found for css.types.color.device-cmyk
.
Check for problems with this page or contribute a missing spec_url
to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.
Browser compatibility
No compatibility data found for css.types.color.device-cmyk
.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.
© 2005–2021 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()