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 fuchsia | Schriftfarbe navy | |||||
Detail | : | Hintergrund fuchsia | Detail | : | Schrift navy | |
Farbe | : | fuchsia | Farbe | : | navy | |
Farbwert | : | #ff00ff | Farbwert | : | #000080 | |
HTML | : | fuchsia | HTML | : | navy | |
HTML (Wert) | : | #ff00ff | HTML (Wert) | : | #000080 | |
CSS | : | fuchsia | CSS | : | navy | |
CSS (Wert) | : | #ff00ff | CSS (Wert) | : | #000080 | |
CSS (kürzest) | : | #f0f | CSS (kürzest) | : | #000080 | |
CSS (RGB) | : | rgb(255,0,255) | CSS (RGB) | : | rgb(0,0,128) | |
CSS (%RGB) | : | rgb(100%,0%,100%) | CSS (%RGB) | : | rgb(0%,0%,50%) |
Verlauf Hintergrundfarbe fuchsia nach Schriftfarbe navy | |||||||
#ff00ff | #da00ec | #b600da | #9100c8 | #6d00b6 | #4800a4 | #240092 | #000080 |
#ff00ff | #da00ec | #b600da | #9100c8 | #6d00b6 | #4800a4 | #240092 | #000080 |
Kombination von fuchsia und navy | |||||||
Cras vestibulum tristique erat, ac interdum justo cursus in. Cras id velit ante. Suspendisse augue erat, auctor ut ultricies non, facilisis sed neque. Aliquam dapibus, lorem sed bibendum consectetur, ligula enim dignissim ligula, a ultrices dolor augue ultrices magna. Lorem ipsum dolor sit amet, consectetur adipiscing elit. | navy eignet sich nicht als Schriftfarbe auf Hintergrund fuchsia. Weder der Helligkeitsunterschied noch der Farbunterschied sind geeignet. Die Ähnlichkeit von navy und fuchsia beträgt 75.69%. Die Lesbarkeit dieser Kombination bewerte ich mit 24.31%. |
Hintergrundfarbe fuchsia | Schriftfarbe navy | ||||||
Verlauf nach Weiß | Verlauf nach Schwarz | Verlauf nach Weiß | Verlauf nach Schwarz | ||||
#ff00ff | #ff00ff | #ff00ff | #ff00ff | #000080 | #000080 | #000080 | #000080 |
#ff24ff | #ff24ff | #da00da | #da00da | #242492 | #242492 | #00006d | #00006d |
#ff48ff | #ff48ff | #b600b6 | #b600b6 | #4848a4 | #4848a4 | #00005b | #00005b |
#ff6dff | #ff6dff | #910091 | #910091 | #6d6db6 | #6d6db6 | #000049 | #000049 |
#ff91ff | #ff91ff | #6d006d | #6d006d | #9191c8 | #9191c8 | #000036 | #000036 |
#ffb6ff | #ffb6ff | #480048 | #480048 | #b6b6da | #b6b6da | #000024 | #000024 |
#ffdaff | #ffdaff | #240024 | #240024 | #dadaec | #dadaec | #000012 | #000012 |
#ffffff | #ffffff | #000000 | #000000 | #ffffff | #ffffff | #000000 | #000000 |
Hier ändern wir die Textfarbe von <caption> auf Farbe navy. Die Schriftart ändern wir auf monospace. Die Schriftgröße ändern wir auf 9px. Wir unterstreichen den Inhalt von <caption> mit Hilfe eines einfallenden Rahmens mit 4 Pixel Dicke in Farbe fuchsia. Dies geht mit HTML kaum. Deshalb nutzen wir CSS.
<style type="text/css"><!-- caption { border-bottom-width: 4px; font-size: 9px; border-bottom-color: fuchsia; font-family: monospace; color: navy; border-bottom-style: inset; } //--> </style>
Die Idee ist, unterschiedliche Formatierungen für Inhalt und Unterstreichung zu haben.
Mehr zum Thema erfahren Sie in Tabellen in HTML. Einzelheiten vom Tag caption sind in der HTML Referenz unter <caption> gezeigt.
Man redet vom Zebra-Effekt, wenn zwei Farben abweselnd als Hintergrundfarbe verwendet werden. Er unterstützt das Auge zum Beispiel die Zeile oder Spalte nicht zu verlieren. Wir definieren zwei Klassen .yang und .ying für <tr> mit den Hintergrundfarben Farbe fuchsia und Farbe navy.
<style type="text/css"><!-- tr.yang { background-color:fuchsia; } tr.ying { background-color: navy; } //--> </style>
Diese werden dann abwechselnd angewendet.
<table> <tr class="yang"><td>OA-A</td><td>OB-A</td><td>OC-A</td></tr> <tr class="ying"><td>OA-B</td><td>OB-B</td><td>OC-B</td></tr> <tr class="yang"><td>OA-C</td><td>OB-C</td><td>OC-C</td></tr> </table>
Mehr zum Thema erfahren Sie in Tabellen in HTML. Möglichkeiten vom hier gezeigten HTML-Befehl <tr>.
Hintergrund | Farbwert | Farbe | und | Schrift | Farbwert | Farbkombination |
---|---|---|---|---|---|---|
aqua | #00ffff | + | aqua | #00ffff | aqua / fuchsia | |
black | #000000 | + | black | #000000 | black / fuchsia | |
blue | #0000ff | + | blue | #0000ff | blue / fuchsia | |
fuchsia | #ff00ff | + | fuchsia | #ff00ff | fuchsia / fuchsia | |
gray | #808080 | + | gray | #808080 | gray / fuchsia | |
grey | #808080 | + | grey | #808080 | grey / fuchsia | |
green | #008000 | + | green | #008000 | green / fuchsia | |
lime | #00ff00 | + | lime | #00ff00 | lime / fuchsia | |
maroon | #800000 | + | maroon | #800000 | maroon / fuchsia | |
navy | #000080 | + | navy | #000080 | navy / fuchsia | |
olive | #808000 | + | olive | #808000 | olive / fuchsia | |
purple | #800080 | + | purple | #800080 | purple / fuchsia | |
red | #ff0000 | + | red | #ff0000 | red / fuchsia | |
silver | #c0c0c0 | + | silver | #c0c0c0 | silver / fuchsia | |
teal | #008080 | + | teal | #008080 | teal / fuchsia | |
white | #ffffff | + | white | #ffffff | white / fuchsia | |
yellow | #ffff00 | + | yellow | #ffff00 | yellow / fuchsia |