von Thomas Salvador.
Farben werden in HTML entweder mit ihrem Namen oder mit ihrem Wert beschrieben.
Netscape führte seinerzeit die websicheren Farben ein. Neben diesen Farbwerten, die einem bestimmten Schema folgen, definierte man noch 120 Werte und ordnete ihnen Namen zu.
Hintergrundfarbwert #fffafa | Schriftfarbwert #ffe4b5 | |||||
Detail | : | Hintergrund #fffafa | Detail | : | Schrift #ffe4b5 | |
Farbwert | : | #fffafa | Farbwert | : | #ffe4b5 | |
Farbe | : | snow | Farbe | : | moccasin | |
HTML | : | #fffafa | HTML | : | #ffe4b5 | |
HTML (Wert) | : | #fffafa | HTML (Wert) | : | #ffe4b5 | |
CSS | : | #fffafa | CSS | : | #ffe4b5 | |
CSS (Wert) | : | #fffafa | CSS (Wert) | : | #ffe4b5 | |
CSS (kürzest) | : | #fffafa | CSS (kürzest) | : | #ffe4b5 | |
CSS (RGB) | : | rgb(255,250,250) | CSS (RGB) | : | rgb(255,228,181) | |
CSS (%RGB) | : | rgb(100%,98%,98%) | CSS (%RGB) | : | rgb(100%,89%,70%) |
Verlauf Hintergrundfarbwert #fffafa nach Schriftfarbwert #ffe4b5 | |||||||
#fffafa | #fff6f0 | #fff3e6 | #fff0dc | #ffedd2 | #ffeac8 | #ffe7be | #ffe4b5 |
#fffafa | #fff6f0 | #fff3e6 | #fff0dc | #ffedd2 | #ffeac8 | #ffe7be | #ffe4b5 |
Kombination von #fffafa und #ffe4b5 | |||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras id velit ante. Aliquam dapibus, lorem sed bibendum consectetur, ligula enim dignissim ligula, a ultrices dolor augue ultrices magna. Cras vestibulum tristique erat, ac interdum justo cursus in. Suspendisse augue erat, auctor ut ultricies non, facilisis sed neque. | #ffe4b5 ist nicht als Schriftfarbe auf Hintergrund #fffafa geeignet, da die Unterschiede in der Helligkeit und Farbe nicht ausreichend sind. Die Ähnlichkeit der Farben #ffe4b5 und #fffafa beträgt 94.32%. Die Lesbarkeit dieser Kombination von Farben liegt damit bei 5.68%. |
Hintergrundfarbwert #fffafa | Schriftfarbwert #ffe4b5 | ||||||
Verlauf nach Weiß | Verlauf nach Schwarz | Verlauf nach Weiß | Verlauf nach Schwarz | ||||
#fffafa | #fffafa | #fffafa | #fffafa | #ffe4b5 | #ffe4b5 | #ffe4b5 | #ffe4b5 |
#fffafa | #fffafa | #dad6d6 | #dad6d6 | #ffe7bf | #ffe7bf | #dac39b | #dac39b |
#fffbfb | #fffbfb | #b6b2b2 | #b6b2b2 | #ffebca | #ffebca | #b6a281 | #b6a281 |
#fffcfc | #fffcfc | #918e8e | #918e8e | #ffefd4 | #ffefd4 | #918267 | #918267 |
#fffcfc | #fffcfc | #6d6b6b | #6d6b6b | #fff3df | #fff3df | #6d614d | #6d614d |
#fffdfd | #fffdfd | #484747 | #484747 | #fff7e9 | #fff7e9 | #484133 | #484133 |
#fffefe | #fffefe | #242323 | #242323 | #fffbf4 | #fffbf4 | #242019 | #242019 |
#ffffff | #ffffff | #000000 | #000000 | #ffffff | #ffffff | #000000 | #000000 |
Die Textfarbe soll sich von Farbwert #fffafa auf Farbwert #ffe4b5 ändern, wenn man mit der Maus darauf zeigt. Bereiten wir zunächst die Darstellung von <address> in Farbwert #fffafa vor.
Z.B. legen wir die Textfarbe von <address> auf Farbwert #fffafa fest. Zwar ändern wir die Hintergrundfarbe nicht, setzen jedoch die Schriftart auf monospace.
<style type="text/css"><!-- address { color:#fffafa; font-family:monospace; } //--> </style>Jetzt stellen wir ein, dass sich bei Hover die Textfarbe auf #ffe4b5 ändert.
<style type="text/css"><!-- address: hover { color: #ffe4b5; } //--> </style>
Weiteres zum Thema address erfahren Sie in Blockorientierte Elemente in HTML. Einzelheiten vom Befehl address finden Sie in der HTML Referenz unter <address>.