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 #ffffff | |||||
Detail | : | Hintergrund olive | Detail | : | Schrift #ffffff | |
Farbe | : | olive | Farbwert | : | #ffffff | |
Farbwert | : | #808000 | Farbe | : | white | |
HTML | : | olive | HTML | : | #ffffff | |
HTML (Wert) | : | #808000 | HTML (Wert) | : | #ffffff | |
CSS | : | olive | CSS | : | #ffffff | |
CSS (Wert) | : | #808000 | CSS (Wert) | : | #ffffff | |
CSS (kürzest) | : | #808000 | CSS (kürzest) | : | #fff | |
CSS (RGB) | : | rgb(128,128,0) | CSS (RGB) | : | rgb(255,255,255) | |
CSS (%RGB) | : | rgb(50%,50%,0%) | CSS (%RGB) | : | rgb(100%,100%,100%) |
Verlauf Hintergrundfarbe olive nach Schriftfarbwert #ffffff | |||||||
#808000 | #929224 | #a4a448 | #b6b66d | #c8c891 | #dadab6 | #ececda | #ffffff |
#808000 | #929224 | #a4a448 | #b6b66d | #c8c891 | #dadab6 | #ececda | #ffffff |
Kombination von olive und #ffffff | |||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vestibulum tristique erat, ac interdum justo cursus in. Cras id velit ante. 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. | #ffffff eignet sich als Schriftfarbe auf Hintergrund olive, weil Helligkeitsunterschied und Farbenunterschied gut sind. Die Ähnlichkeit der Farben #ffffff und olive beträgt 80.02%. Die Lesbarkeit dieser Kombination liegt damit bei 19.98%. |
Hintergrundfarbe olive | Schriftfarbwert #ffffff | ||||||
Verlauf nach Weiß | Verlauf nach Schwarz | Verlauf nach Weiß | Verlauf nach Schwarz | ||||
#808000 | #808000 | #808000 | #808000 | #ffffff | #ffffff | #ffffff | #ffffff |
#929224 | #929224 | #6d6d00 | #6d6d00 | #ffffff | #ffffff | #dadada | #dadada |
#a4a448 | #a4a448 | #5b5b00 | #5b5b00 | #ffffff | #ffffff | #b6b6b6 | #b6b6b6 |
#b6b66d | #b6b66d | #494900 | #494900 | #ffffff | #ffffff | #919191 | #919191 |
#c8c891 | #c8c891 | #363600 | #363600 | #ffffff | #ffffff | #6d6d6d | #6d6d6d |
#dadab6 | #dadab6 | #242400 | #242400 | #ffffff | #ffffff | #484848 | #484848 |
#ececda | #ececda | #121200 | #121200 | #ffffff | #ffffff | #242424 | #242424 |
#ffffff | #ffffff | #000000 | #000000 | #ffffff | #ffffff | #000000 | #000000 |
Bei diesem Beispiel umranden wir <img> mit einem gepunkteten, 3 Punkte dicken Rahmen in Farbwert #ffffff . Die Hintergrundfarbe für <img> färben wir mit Farbe olive. Dies ist mit HTML nicht möglich. Daher verwenden wir hier CSS.
<style type="text/css"><!-- img { border:3pt dotted #fff; background-color:olive; } //--> </style>
Mehr zum Thema img können Sie in Grafik in HTML nachlesen. Mehr zum hier genutzten HTML-Befehl <img>.
Die Unterstreichungsfarbe soll sich von Farbe olive auf Farbwert #ffffff ändern, wenn man mit der Maus darauf zeigt. Bereiten wir zunächst die Formatierung von <ins> in Farbe olive vor.
Hier unterstreichen wir <ins> mit Hilfe eines gezahnten Rahmens mit 4 Pixel Dicke in Farbe olive.
<style type="text/css"><!-- ins { border-bottom-color: olive; border-bottom-style: ridge; border-bottom-width: 4px; } //--> </style>Jetzt fordern wir, dass bei Mausberührung die Farbe der Unterstreichung auf #ffffff gesetzt wird.
<style type="text/css"><!-- ins:hover { border-bottom-color:#fff; } //--> </style>
Die Idee ist hierbei, verschiedene Formatierungen für Inhalt und Unterstreichung zu nutzen. Manchmal sehen Sie diesen Effekt bei Links. Der Text wird in einer Farbe dargestellt. Und die Unterstreichung in einer anderen. Dies ist aber keine normale Unterstreichung, der Text selbst hat keine Unterstreichung. Die Unterstreichung wird mit einem Rahmen simuliert und ist unabhängig vom Text.
Zur Beschreibung des Tag <ins>.
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 |