von Thomas Salvador.
Farben werden in HTML entweder mit ihrem Namen oder mit ihrem Wert beschrieben.
HTML verfügt seit jeher über 17 Standard Farbnamen.
Sie entstehen dadurch, dass die 8 Grundfarben jeweils maximal und zu 50% enthalten sind.
Zu diesen 16 Farben kommt mit grey eine alternative Schreibweise für gray.
Hintergrundfarbe white | Schriftfarbwert #ff0000 | |||||
Detail | : | Hintergrund white | Detail | : | Schrift #ff0000 | |
Farbe | : | white | Farbwert | : | #ff0000 | |
Farbwert | : | #ffffff | Farbe | : | red | |
HTML | : | white | HTML | : | #ff0000 | |
HTML (Wert) | : | #ffffff | HTML (Wert) | : | #ff0000 | |
CSS | : | white | CSS | : | #ff0000 | |
CSS (Wert) | : | #ffffff | CSS (Wert) | : | #ff0000 | |
CSS (kürzest) | : | #fff | CSS (kürzest) | : | #f00 | |
CSS (RGB) | : | rgb(255,255,255) | CSS (RGB) | : | rgb(255,0,0) | |
CSS (%RGB) | : | rgb(100%,100%,100%) | CSS (%RGB) | : | rgb(100%,0%,0%) |
Verlauf Hintergrundfarbe white nach Schriftfarbwert #ff0000 | |||||||
#ffffff | #ffdada | #ffb6b6 | #ff9191 | #ff6d6d | #ff4848 | #ff2424 | #ff0000 |
#ffffff | #ffdada | #ffb6b6 | #ff9191 | #ff6d6d | #ff4848 | #ff2424 | #ff0000 |
Kombination von white und #ff0000 | |||||||
Cras vestibulum tristique erat, ac interdum justo cursus in. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse augue erat, auctor ut ultricies non, facilisis sed neque. Cras id velit ante. Aliquam dapibus, lorem sed bibendum consectetur, ligula enim dignissim ligula, a ultrices dolor augue ultrices magna. | #ff0000 eignet sich als Schriftfarbe auf Hintergrund white. Sowohl der Helligkeitsunterschied als auch der Unterschied in den Farben sind gut. Die Ähnlichkeit von #ff0000 und white beträgt 80.96%. Die Lesbarkeit dieser Farbkombination bewerte ich mit 19.04%. |
Hintergrundfarbe white | Schriftfarbwert #ff0000 | ||||||
Verlauf nach Weiß | Verlauf nach Schwarz | Verlauf nach Weiß | Verlauf nach Schwarz | ||||
#ffffff | #ffffff | #ffffff | #ffffff | #ff0000 | #ff0000 | #ff0000 | #ff0000 |
#ffffff | #ffffff | #dadada | #dadada | #ff2424 | #ff2424 | #da0000 | #da0000 |
#ffffff | #ffffff | #b6b6b6 | #b6b6b6 | #ff4848 | #ff4848 | #b60000 | #b60000 |
#ffffff | #ffffff | #919191 | #919191 | #ff6d6d | #ff6d6d | #910000 | #910000 |
#ffffff | #ffffff | #6d6d6d | #6d6d6d | #ff9191 | #ff9191 | #6d0000 | #6d0000 |
#ffffff | #ffffff | #484848 | #484848 | #ffb6b6 | #ffb6b6 | #480000 | #480000 |
#ffffff | #ffffff | #242424 | #242424 | #ffdada | #ffdada | #240000 | #240000 |
#ffffff | #ffffff | #000000 | #000000 | #ffffff | #ffffff | #000000 | #000000 |
Wir ändern in diesem Beispiel die Textfarbe von <address> auf Farbwert #ff0000. Die Schriftart setzen wir auf monospace und erhöhen die Schriftgröße auf 127%. Wir unterstreichen den Inhalt von <address> mit Hilfe eines gefurchten Rahmens mit 3 Punkte Dicke in Farbe white. Mit HTML geht das kaum. Deshalb verwenden wir CSS.
<style type="text/css"><!-- address { border-bottom-style:groove; border-bottom-color:white; color:#ff0000; border-bottom-width:3pt; font-size:127%; font-family:monospace; } //--> </style>
Die Idee ist, unterschiedliche Formatierungen für Inhalt und Unterstreichung zu haben.
Mehr zum Thema lesen Sie in Blockorientierte Elemente in HTML. Einzelheiten des Befehl address sind in der HTML Referenz unter <address> ausführlich gezeigt.
Die Rahmenfarbe soll sich von Farbe white auf Farbwert #ff0000 ändern, wenn man mit der Maus auf <table> zeigt. Wir bereiten zunächst eine Darstellung von <table> in Farbe white vor.
In diesem Beispiel umranden wir <table> mit einem 3 Pixel dicken, einfallenden Rahmen in Farbe white.
<style type="text/css"><!-- table { border-color:white; border-width:3px; border-style:inset; } //--> </style>Nun stellen wir ein, dass sich bei Mausberührung die Rahmenfarbe zu #ff0000 ändert.
<style type="text/css"><!-- table: hover { border-color: #ff0000; } //--> </style>
Mehr zum Thema table können Sie in Tabellen in HTML lesen. Einzelheiten vom hier genutzten Befehl table sind in der HTML Referenz unter <table> ausführlich gezeigt.
Hintergrund | Farbwert | Farbe | und | Schrift | Farbwert | Farbkombination |
---|---|---|---|---|---|---|
aqua | #00ffff | + | aqua | #00ffff | aqua / white | |
black | #000000 | + | black | #000000 | black / white | |
blue | #0000ff | + | blue | #0000ff | blue / white | |
fuchsia | #ff00ff | + | fuchsia | #ff00ff | fuchsia / white | |
gray | #808080 | + | gray | #808080 | gray / white | |
grey | #808080 | + | grey | #808080 | grey / white | |
green | #008000 | + | green | #008000 | green / white | |
lime | #00ff00 | + | lime | #00ff00 | lime / white | |
maroon | #800000 | + | maroon | #800000 | maroon / white | |
navy | #000080 | + | navy | #000080 | navy / white | |
olive | #808000 | + | olive | #808000 | olive / white | |
purple | #800080 | + | purple | #800080 | purple / white | |
red | #ff0000 | + | red | #ff0000 | red / white | |
silver | #c0c0c0 | + | silver | #c0c0c0 | silver / white | |
teal | #008080 | + | teal | #008080 | teal / white | |
white | #ffffff | + | white | #ffffff | white / white | |
yellow | #ffff00 | + | yellow | #ffff00 | yellow / white |