Colores CMYK


CMYK es un estándar sugerido para CSS4.


Calculadora CMYK


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


C:
METRO:
Y:
K:

Colores CMYK

Los colores CMYK son una combinación de CIAN, MAGENTA, AMARILLO y NEGRO.

Las pantallas de las computadoras muestran colores usando valores de color RGB. Las impresoras a menudo presentan colores utilizando valores de color CMYK.


Soporte HTML

CMYK no es compatible con HTML, pero se sugiere como un nuevo estándar en CSS4.

Mientras espera por CSS4, puede incluir la biblioteca de colores de W3Schools y usar CMYK como un atributo HTML como este:



Inténtalo tú mismo

Ejemplo

<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 colores W3Schools

La biblioteca de JavaScript utilizada en el ejemplo anterior se puede descargar desde:

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


"; } x += ""; x += ""; for (i = 0; i "; } x += ""; x += ""; document.getElementById("cyantable").innerHTML = x; } function dibujarMagentaTable() { var x, i, c, y, k, color; c = 0; y = 0; k = 0; x = "" x += ""; for (i = 0; i "; } x += ""; x += ""; para (i = 0; i "; } x += ""; x += "
" + yo + "
"; document.getElementById("magentatable").innerHTML = x; } function dibujarYellowTable() { 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 += "
" + yo + "
"; document.getElementById("yellowtable").innerHTML = x; } function dibujarBlackTable() { 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 += "
" + yo + "
getElementById("m01"); } if (e == 2) { x = documento.getElementById("y01"); } if (e == 3) { x = documento.getElementById("k01"); } x.valor = n; establecerColor(x); } } function setColor(elmnt) { var ele, col, c, m, y, k, rgb; c = documento.getElementById("c01"); m = documento.getElementById("m01"); y = documento.getElementById("y01"); k = documento.getElementById("k01"); elmnt.valor = Número(elmnt.valor); if (parseInt(elmnt.value) 100) {elmnt.value = "100";} rgb = w3color("cmyk(" + c.value + "%, " + m.value + "%, " + y.value + "%, " + k.valor + "%)"); document.getElementById("resultado01").style.backgroundColor = rgb.toRgbString(); documento. getElementById("cmyk01").value = rgb.toCmykString(); documento.getElementById("rgb01").innerHTML = rgb.toRgbString(); documento.getElementById("hsl01").innerHTML = rgb.toHslString(); documento.getElementById("hex01").innerHTML = rgb.toHexString(); para (i = 0; yo

"; } 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();