Farben HWB


HWB (Hue, Whiteness, Blackness) ist ein vorgeschlagener Standard für CSS4.


HWB-Rechner


 
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 ( ich = 0; ich "; } x += "
" + i + "
"; document.getElementById("whitetable").innerHTML = x; } function drawBlackTable(hue) { var x, i; x = "" x += ""; for (i = 0; i "; } x += ""; x += ""; für (i = 0; ich "; } x += "
" + i + "
"; document.getElementById("blacktable").innerHTML = x; } drawWhiteTable(0); drawHueTable(0); drawBlackTable(0);

HTML-Unterstützung

HWB wird in HTML (noch) nicht unterstützt, wird aber als neuer Standard in CSS4 vorgeschlagen.

Während Sie auf CSS4 warten, können Sie die Farbbibliothek von W3Schools einbinden und HWB wie folgt als HTML-Attribut verwenden:

Beispiel

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

W3Schools-Farbbibliothek

Die im obigen Beispiel verwendete JavaScript-Bibliothek kann von heruntergeladen werden

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


❮ Vorherige Nächste ❯