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 maroon | Schriftfarbwert #008000 | |||||
Detail | : | Hintergrund maroon | Detail | : | Schrift #008000 | |
Farbe | : | maroon | Farbwert | : | #008000 | |
Farbwert | : | #800000 | Farbe | : | green | |
HTML | : | maroon | HTML | : | #008000 | |
HTML (Wert) | : | #800000 | HTML (Wert) | : | #008000 | |
CSS | : | maroon | CSS | : | #008000 | |
CSS (Wert) | : | #800000 | CSS (Wert) | : | #008000 | |
CSS (kürzest) | : | #800000 | CSS (kürzest) | : | #008000 | |
CSS (RGB) | : | rgb(128,0,0) | CSS (RGB) | : | rgb(0,128,0) | |
CSS (%RGB) | : | rgb(50%,0%,0%) | CSS (%RGB) | : | rgb(0%,50%,0%) |
Verlauf Hintergrundfarbe maroon nach Schriftfarbwert #008000 | |||||||
#800000 | #6d1200 | #5b2400 | #493600 | #364900 | #245b00 | #126d00 | #008000 |
#800000 | #6d1200 | #5b2400 | #493600 | #364900 | #245b00 | #126d00 | #008000 |
Kombination von maroon und #008000 | |||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras id velit ante. Cras vestibulum tristique erat, ac interdum justo cursus in. 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. | Auf Hintergrund maroon ist #008000 ungeeignet. Weder der Helligkeitsunterschied noch der Farbunterschied sind ausreichend. Die Ähnlichkeit von #008000 und maroon ergibt sich zu 89.85%. Die Lesbarkeit dieser Farbkombination liegt damit bei 10.15%. |
Hintergrundfarbe maroon | Schriftfarbwert #008000 | ||||||
Verlauf nach Weiß | Verlauf nach Schwarz | Verlauf nach Weiß | Verlauf nach Schwarz | ||||
#800000 | #800000 | #800000 | #800000 | #008000 | #008000 | #008000 | #008000 |
#922424 | #922424 | #6d0000 | #6d0000 | #249224 | #249224 | #006d00 | #006d00 |
#a44848 | #a44848 | #5b0000 | #5b0000 | #48a448 | #48a448 | #005b00 | #005b00 |
#b66d6d | #b66d6d | #490000 | #490000 | #6db66d | #6db66d | #004900 | #004900 |
#c89191 | #c89191 | #360000 | #360000 | #91c891 | #91c891 | #003600 | #003600 |
#dab6b6 | #dab6b6 | #240000 | #240000 | #b6dab6 | #b6dab6 | #002400 | #002400 |
#ecdada | #ecdada | #120000 | #120000 | #daecda | #daecda | #001200 | #001200 |
#ffffff | #ffffff | #000000 | #000000 | #ffffff | #ffffff | #000000 | #000000 |
Hier umranden wir <s> mit einem . Die Hintergrundfarbe für <s> setzen wir auf Farbe maroon. Mit HTML ist dies nicht machbar. Wir verwenden daher CSS zur Formatierung.
<style type="text/css"><!-- s { border:4pt inset #008000; background-color:maroon; } //--> </style>
Weiteres zu s können Sie in Text in HTML lesen. Einzelheiten vom Tag s sind in der HTML Referenz unter <s> zusammengestellt.
Wir ändern für dieses Beispiel die Textfarbe von <caption> auf Farbwert #008000. Die Schriftart setzen wir auf sans-serif. Die Schriftgröße setzen wir auf 13px. Wir unterstreichen den Inhalt von <caption> mit Hilfe eines doppelten Rahmens mit 3 Pixel Dicke in Farbe maroon. Dies geht mit HTML nicht. Wir nutzen deshalb CSS zur Formatierung.
<style type="text/css"><!-- caption { color: #008000; border-bottom-width: 3px; font-size: 13px; font-family: sans-serif; border-bottom-style: double; border-bottom-color: maroon; } //--> </style>
Die Idee ist, unterschiedliche Formatierungen für Inhalt und Unterstreichung zu haben.
Mehr zu caption erfahren Sie in Tabellen in HTML. Der hier gezeigte Befehl caption ist in der HTML Referenz unter <caption> ausführlich gezeigt.
Hintergrund | Farbwert | Farbe | und | Schrift | Farbwert | Farbkombination |
---|---|---|---|---|---|---|
aqua | #00ffff | + | aqua | #00ffff | aqua / maroon | |
black | #000000 | + | black | #000000 | black / maroon | |
blue | #0000ff | + | blue | #0000ff | blue / maroon | |
fuchsia | #ff00ff | + | fuchsia | #ff00ff | fuchsia / maroon | |
gray | #808080 | + | gray | #808080 | gray / maroon | |
grey | #808080 | + | grey | #808080 | grey / maroon | |
green | #008000 | + | green | #008000 | green / maroon | |
lime | #00ff00 | + | lime | #00ff00 | lime / maroon | |
maroon | #800000 | + | maroon | #800000 | maroon / maroon | |
navy | #000080 | + | navy | #000080 | navy / maroon | |
olive | #808000 | + | olive | #808000 | olive / maroon | |
purple | #800080 | + | purple | #800080 | purple / maroon | |
red | #ff0000 | + | red | #ff0000 | red / maroon | |
silver | #c0c0c0 | + | silver | #c0c0c0 | silver / maroon | |
teal | #008080 | + | teal | #008080 | teal / maroon | |
white | #ffffff | + | white | #ffffff | white / maroon | |
yellow | #ffff00 | + | yellow | #ffff00 | yellow / maroon |