Colori HWB


HWB (Hue, Whiteness, Blackness) è uno standard suggerito per CSS4.


Calcolatrice HWB


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


H:
W:
B:
"; } x += ""; x += ""; n = 0; for (i = 0; i "; } x += ""; x += ""; document.getElementById("huetable"). innerHTML = x; } function drawWhiteTable(hue) { var x, i; x = "" x += ""; for (i = 0; i "; } x += ""; x += ""; for ( io = 0; io "; } x += "
" + i + "
"; document.getElementById("whitetable").innerHTML = x; } function drawBlackTable(hue) { var x, i; x = "" x += ""; for (i = 0; i "; } x += ""; x += ""; for (i = 0; io "; } x += "
" + i + "
"; document.getElementById("blacktable").innerHTML = x; } drawWhiteTable(0); drawHueTable(0); drawBlackTable(0);

Supporto HTML

HWB non è (ancora) supportato in HTML, ma è suggerito come nuovo standard in CSS4.

In attesa di CSS4, puoi includere la libreria Color di W3Schools e utilizzare HWB come attributo HTML come questo:

Esempio

<div data-w3-color="hwb(60, 50%, 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>

Libreria dei colori di W3Schools

La libreria JavaScript utilizzata nell'esempio sopra può essere scaricata da

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


❮ Precedente Prossimo ❯