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, einem bestimmten Schema folgenden, Farbwerten, definierte man noch 120 Werte und ordnete ihnen Namen zu. Zusammen mit den 17 Standard-HTML-Farben, die ebenfalls Namen haben, ergeben sich so 137 HTML Farbnamen.
Hintergrundfarbe burlywood | Schriftfarbe maroon | |||||
Detail | : | Hintergrund burlywood | Detail | : | Schrift maroon | |
Farbe | : | burlywood | Farbe | : | maroon | |
Farbwert | : | #deb887 | Farbwert | : | #800000 | |
HTML | : | burlywood | HTML | : | maroon | |
HTML (Wert) | : | #deb887 | HTML (Wert) | : | #800000 | |
CSS | : | burlywood | CSS | : | maroon | |
CSS (Wert) | : | #deb887 | CSS (Wert) | : | #800000 | |
CSS (kürzest) | : | #deb887 | CSS (kürzest) | : | #800000 | |
CSS (RGB) | : | rgb(222,184,135) | CSS (RGB) | : | rgb(128,0,0) | |
CSS (%RGB) | : | rgb(87%,72%,52%) | CSS (%RGB) | : | rgb(50%,0%,0%) |
Verlauf Hintergrundfarbe burlywood nach Schriftfarbe maroon | |||||||
#deb887 | #d09d73 | #c38360 | #b5694d | #a84e39 | #9a3426 | #8d1a13 | #800000 |
#deb887 | #d09d73 | #c38360 | #b5694d | #a84e39 | #9a3426 | #8d1a13 | #800000 |
Kombination von burlywood und maroon | |||||||
Cras id velit ante. Suspendisse augue erat, auctor ut ultricies non, facilisis sed neque. Cras vestibulum tristique erat, ac interdum justo cursus in. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam dapibus, lorem sed bibendum consectetur, ligula enim dignissim ligula, a ultrices dolor augue ultrices magna. | Die Ähnlichkeit von maroon und burlywood ergibt sich zu 71.91%. Die Lesbarkeit dieser Kombination ergibt sich zu 28.09%. Auf Hintergrund burlywood ist maroon ungeeignet. Zwar ist der Helligkeitsunterschied in Ordnung, doch die Farben selbst sind zu ähnlich. |
Hintergrundfarbe burlywood | Schriftfarbe maroon | ||||||
Verlauf nach Weiß | Verlauf nach Schwarz | Verlauf nach Weiß | Verlauf nach Schwarz | ||||
#deb887 | #deb887 | #deb887 | #deb887 | #800000 | #800000 | #800000 | #800000 |
#e2c298 | #e2c298 | #be9d73 | #be9d73 | #922424 | #922424 | #6d0000 | #6d0000 |
#e7cca9 | #e7cca9 | #9e8360 | #9e8360 | #a44848 | #a44848 | #5b0000 | #5b0000 |
#ecd6ba | #ecd6ba | #7e694d | #7e694d | #b66d6d | #b66d6d | #490000 | #490000 |
#f0e0cb | #f0e0cb | #5f4e39 | #5f4e39 | #c89191 | #c89191 | #360000 | #360000 |
#f5eadc | #f5eadc | #3f3426 | #3f3426 | #dab6b6 | #dab6b6 | #240000 | #240000 |
#faf4ed | #faf4ed | #1f1a13 | #1f1a13 | #ecdada | #ecdada | #120000 | #120000 |
#ffffff | #ffffff | #000000 | #000000 | #ffffff | #ffffff | #000000 | #000000 |
Die Unterstreichungsfarbe soll sich von Farbe burlywood auf Farbe maroon ändern, wenn man mit der Maus darauf zeigt. Wir bereiten zunächst eine Formatierung von <acronym> in Farbe burlywood vor.
In diesem Beispiel unterstreichen wir <acronym> mit Hilfe eines gepunkteten Rahmens mit 3 Pixel Dicke in Farbe burlywood.
<style type="text/css"><!-- acronym { border-bottom-color: burlywood; border-bottom-width: 3px; border-bottom-style: dotted; } //--> </style>Jetzt fordern wir, dass sich bei Berührung mit der Maus die Unterstreichungsfarbe auf maroon ändert.
<style type="text/css"><!-- acronym: hover { border-bottom-color: maroon; } //--> </style>
Die Idee ist, unterschiedliche Formatierungen für Inhalt und Unterstreichung zu nutzen. Manchmal sieht man das bei Hyperlinks. Der Text wird in einer Farbe dargestellt. Und die Unterstreichung in einer anderen. Dies ist aber keine "wirkliche" Unterstreichung, der Text selbst ist überhaupt nicht unterstrichen. Sie wird mit einem Rahmen simuliert und dieser ist unabhängig vom Text.
Der HTML-Befehl acronym ist in der HTML Referenz unter <acronym> genau gezeigt.
Hier ändern wir die Textfarbe von <blockquote> auf Farbe maroon und die Hintergrundfarbe von <blockquote> auf Farbe burlywood. Als Schriftart setzen wir sans-serif und ändern die Schriftgröße auf 10pt.
<style type="text/css"><!-- blockquote { color: maroon; background-color: burlywood; font-size: 10pt; font-family: sans-serif; } //--> </style>
Mehr zum Thema können Sie in Blockorientierte Elemente in HTML finden. Beschreibung vom hier verwendeten HTML-Befehl <blockquote>.