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 olive | Schriftfarbwert #000080 | |||||
Detail | : | Hintergrund olive | Detail | : | Schrift #000080 | |
Farbe | : | olive | Farbwert | : | #000080 | |
Farbwert | : | #808000 | Farbe | : | navy | |
HTML | : | olive | HTML | : | #000080 | |
HTML (Wert) | : | #808000 | HTML (Wert) | : | #000080 | |
CSS | : | olive | CSS | : | #000080 | |
CSS (Wert) | : | #808000 | CSS (Wert) | : | #000080 | |
CSS (kürzest) | : | #808000 | CSS (kürzest) | : | #000080 | |
CSS (RGB) | : | rgb(128,128,0) | CSS (RGB) | : | rgb(0,0,128) | |
CSS (%RGB) | : | rgb(50%,50%,0%) | CSS (%RGB) | : | rgb(0%,0%,50%) |
Verlauf Hintergrundfarbe olive nach Schriftfarbwert #000080 | |||||||
#808000 | #6d6d12 | #5b5b24 | #494936 | #363649 | #24245b | #12126d | #000080 |
#808000 | #6d6d12 | #5b5b24 | #494936 | #363649 | #24245b | #12126d | #000080 |
Kombination von olive und #000080 | |||||||
Cras vestibulum tristique erat, ac interdum justo cursus in. Aliquam dapibus, lorem sed bibendum consectetur, ligula enim dignissim ligula, a ultrices dolor augue ultrices magna. Suspendisse augue erat, auctor ut ultricies non, facilisis sed neque. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras id velit ante. | Die Ähnlichkeit von #000080 und olive ergibt sich zu 81.83%. Die Lesbarkeit dieser Kombination ergibt sich zu 18.17%. #000080 ist nicht als Schriftfarbe auf Hintergrund olive geeignet. Sowohl Helligkeit als auch die Farben sind zu ähnlich. |
Hintergrundfarbe olive | Schriftfarbwert #000080 | ||||||
Verlauf nach Weiß | Verlauf nach Schwarz | Verlauf nach Weiß | Verlauf nach Schwarz | ||||
#808000 | #808000 | #808000 | #808000 | #000080 | #000080 | #000080 | #000080 |
#929224 | #929224 | #6d6d00 | #6d6d00 | #242492 | #242492 | #00006d | #00006d |
#a4a448 | #a4a448 | #5b5b00 | #5b5b00 | #4848a4 | #4848a4 | #00005b | #00005b |
#b6b66d | #b6b66d | #494900 | #494900 | #6d6db6 | #6d6db6 | #000049 | #000049 |
#c8c891 | #c8c891 | #363600 | #363600 | #9191c8 | #9191c8 | #000036 | #000036 |
#dadab6 | #dadab6 | #242400 | #242400 | #b6b6da | #b6b6da | #000024 | #000024 |
#ececda | #ececda | #121200 | #121200 | #dadaec | #dadaec | #000012 | #000012 |
#ffffff | #ffffff | #000000 | #000000 | #ffffff | #ffffff | #000000 | #000000 |
Wir ändern für dieses Beispiel die Textfarbe von <col> auf Farbwert #000080 und die Hintergrundfarbe von <col> auf Farbe olive. Die Schriftart setzen wir auf verdana. Als Schriftgröße setzen wir 13px.
<style type="text/css"><!-- col { color: #000080; background-color: olive; font-size: 13px; font-family: verdana; } //--> </style>
Weiteres zu col finden Sie in Tabellen in HTML. Einzelheiten des hier verwendeten HTML-Tag col sind in der HTML Referenz unter <col> genau zusammengestellt.
Die Textfarbe soll sich von Farbe olive auf Farbwert #000080 ändern, wenn man mit der Maus auf <samp> zeigt. Bereiten wir zunächst die Formatierung von <samp> in Farbe olive vor.
Wir legen hier Farbe olive als Textfarbe von <samp> fest. Die Schriftgröße setzen wir auf 13px:
<style type="text/css"><!-- samp { font-size:13px; color:olive; } //--> </style>Jetzt stellen wir ein, dass sich bei Mausberührung die Textfarbe zu #000080 ändert.
<style type="text/css"><!-- samp: hover { color: #000080; } //--> </style>
Mehr zum Thema samp können Sie in Text in HTML nachsehen. Einzelheiten des HTML-Befehl samp sind in der HTML Referenz bei <samp> ausführlich gezeigt.
Hintergrund | Farbwert | Farbe | und | Schrift | Farbwert | Farbkombination |
---|---|---|---|---|---|---|
aqua | #00ffff | + | aqua | #00ffff | aqua / olive | |
black | #000000 | + | black | #000000 | black / olive | |
blue | #0000ff | + | blue | #0000ff | blue / olive | |
fuchsia | #ff00ff | + | fuchsia | #ff00ff | fuchsia / olive | |
gray | #808080 | + | gray | #808080 | gray / olive | |
grey | #808080 | + | grey | #808080 | grey / olive | |
green | #008000 | + | green | #008000 | green / olive | |
lime | #00ff00 | + | lime | #00ff00 | lime / olive | |
maroon | #800000 | + | maroon | #800000 | maroon / olive | |
navy | #000080 | + | navy | #000080 | navy / olive | |
olive | #808000 | + | olive | #808000 | olive / olive | |
purple | #800080 | + | purple | #800080 | purple / olive | |
red | #ff0000 | + | red | #ff0000 | red / olive | |
silver | #c0c0c0 | + | silver | #c0c0c0 | silver / olive | |
teal | #008080 | + | teal | #008080 | teal / olive | |
white | #ffffff | + | white | #ffffff | white / olive | |
yellow | #ffff00 | + | yellow | #ffff00 | yellow / olive |