Cores CMYK


CMYK é um padrão sugerido para CSS4.


Calculadora CMYK


 
rgb(255, 0, 0)
#ff0000
hsl(0, 100%, 50%)


C:
M:
Y:
K:

Cores CMYK

As cores CMYK são uma combinação de CYAN, MAGENTA, YELLOW e BLACK.

As telas de computador exibem cores usando valores de cores RGB. As impressoras geralmente apresentam cores usando valores de cores CMYK.


Suporte HTML

CMYK não é suportado em HTML, mas é sugerido como um novo padrão em CSS4.

Enquanto espera pelo CSS4, você pode incluir a biblioteca de cores do W3Schools e usar CMYK como um atributo HTML como este:



Tente você mesmo

Exemplo

<div data-w3-color="cmyk(100%, 0%, 0%, 0%)">

<p>London is the capital city of England.
It is the most populous city in the United Kingdom,
with a metropolitan area of over 13 million inhabitants.</p>

</div>

<script src="/lib/w3color.js"></script>

Biblioteca de cores do W3Schools

A biblioteca JavaScript usada no exemplo acima pode ser baixada em:

https://www.w3schools.com/lib/w3color.js


"; } x += ""; x += ""; for (i = 0; i "; } x += ""; x += ""; document.getElementById("cyantable").innerHTML = x; } function drawMagentaTable() { var x, i, c, y, k, color; c = 0; y = 0; k = 0; x = "" x += ""; for (i = 0; i "; } x += ""; x += ""; for (i = 0; i "; } x += ""; x += "
" + eu + "
"; document.getElementById("magentatable").innerHTML = x; } function drawYellowTable() { var x, i, c, m, k, color; c = 0; m = 0; k = 0; x = "" x += ""; para (i = 0; i "; } x += ""; x += ""; para (i = 0; i "; } x += ""; x += "
" + eu + "
"; document.getElementById("yellowtable").innerHTML = x; } function drawBlackTable() { var x, i, c, m, y, color; c = 0; m = 0; y = 0; x = "" x += ""; para (i = 0; i "; } x += ""; x += ""; para (i = 0; i "; } x += ""; x += "
" + eu + "
getElementById("m01"); } if (e == 2) { x = document.getElementById("y01"); } if (e == 3) { x = document.getElementById("k01"); } x.valor = n; setCor(x); } } function setColor(elmnt) { var ele, col, c, m, y, k, rgb; c = document.getElementById("c01"); m = document.getElementById("m01"); y = document.getElementById("y01"); k = document.getElementById("k01"); elmnt.value = Number(elmnt.value); if (parseInt(elmnt.value) 100) {elmnt.value = "100";} rgb = w3color("cmyk(" + c.value + "%, " + m.value + "%, " + y.value + "%, " + k.valor + "%)"); document.getElementById("result01").style.backgroundColor = rgb.toRgbString(); documento. getElementById("cmyk01").value = rgb.toCmykString(); document.getElementById("rgb01").innerHTML = rgb.toRgbString(); document.getElementById("hsl01").innerHTML = rgb.toHslString(); document.getElementById("hex01").innerHTML = rgb.toHexString(); para (i = 0; i

"; } function setFullColor() { var color = w3color(document.getElementById("cmyk01").value); var cmyk = color.toCmyk(); document.getElementById("c01").value = (cmyk.c * 100).toFixed(0); document.getElementById("m01").value = (cmyk.m * 100).toFixed(0); document.getElementById("y01").value = (cmyk.y * 100) .toFixed(0); document.getElementById("k01").value = (cmyk.k * 100).toFixed(0); setColor(document.getElementById("c01")); } color = w3color("cmyk( 100%, 0%, 0%, 0%)"); document.getElementById("cmyk01").value = color.toCmykString(); setFullColor();