von Thomas Salvador.
Graustufen gehören zu den unbunten Farben und zeichnen sich dadurch aus, dass ihre Farbwerte für Rot, Grün und Blau gleich sind.
Graustufen enthalten natürlich alle 16 Graustufen und insbesondere die unbunten Grundfarben Schwarz und Weiß.
Um 256 Graustufen in HTML bzw. CSS zu erzeugen, wählen wir Farbwerte rr, gg und bb mit Werten von 0 bis 255 (d.h. hexadezimal 00 bis ff).
Hintergrundfarbe gray85 | Schriftfarbe gray72 | |||||
Detail | : | Hintergrund gray85 | Detail | : | Schrift gray72 | |
Farbe | : | gray85 | Farbe | : | gray72 | |
Farbwert | : | #555555 | Farbwert | : | #484848 | |
HTML | : | gray85 | HTML | : | gray72 | |
HTML (Wert) | : | #555555 | HTML (Wert) | : | #484848 | |
CSS | : | gray85 | CSS | : | gray72 | |
CSS (Wert) | : | #555555 | CSS (Wert) | : | #484848 | |
CSS (kürzest) | : | #555 | CSS (kürzest) | : | #484848 | |
CSS (RGB) | : | rgb(85,85,85) | CSS (RGB) | : | rgb(72,72,72) | |
CSS (%RGB) | : | rgb(33%,33%,33%) | CSS (%RGB) | : | rgb(28%,28%,28%) |
Verlauf Hintergrundfarbe gray85 nach Schriftfarbe gray72 | |||||||
#555555 | #535353 | #515151 | #4f4f4f | #4d4d4d | #4b4b4b | #494949 | #484848 |
#555555 | #535353 | #515151 | #4f4f4f | #4d4d4d | #4b4b4b | #494949 | #484848 |
Kombination von gray85 und gray72 | |||||||
Suspendisse augue erat, auctor ut ultricies non, facilisis sed neque. Lorem ipsum dolor sit amet, consectetur adipiscing elit. 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. Cras id velit ante. | gray72 ist nicht als Schriftfarbe auf Hintergrund gray85 geeignet, da sowohl Helligkeit als auch die Farben zu ähnlich sind. Die Ähnlichkeit der Farben gray72 und gray85 ergibt sich zu 94.16%. Die Lesbarkeit dieser Kombination bewerte ich mit 5.84%. |
Hintergrundfarbe gray85 | Schriftfarbe gray72 | ||||||
Verlauf nach Weiß | Verlauf nach Schwarz | Verlauf nach Weiß | Verlauf nach Schwarz | ||||
#555555 | #555555 | #555555 | #555555 | #484848 | #484848 | #484848 | #484848 |
#6d6d6d | #6d6d6d | #484848 | #484848 | #626262 | #626262 | #3d3d3d | #3d3d3d |
#858585 | #858585 | #3c3c3c | #3c3c3c | #7c7c7c | #7c7c7c | #333333 | #333333 |
#9d9d9d | #9d9d9d | #303030 | #303030 | #969696 | #969696 | #292929 | #292929 |
#b6b6b6 | #b6b6b6 | #242424 | #242424 | #b0b0b0 | #b0b0b0 | #1e1e1e | #1e1e1e |
#cecece | #cecece | #181818 | #181818 | #cacaca | #cacaca | #141414 | #141414 |
#e6e6e6 | #e6e6e6 | #0c0c0c | #0c0c0c | #e4e4e4 | #e4e4e4 | #0a0a0a | #0a0a0a |
#ffffff | #ffffff | #000000 | #000000 | #ffffff | #ffffff | #000000 | #000000 |
Ein Hyperlink wird mit HTML-Befehl <a> gesetzt. Dieser kann hervorgehoben und farblich gestaltet werden.
Die Textfarbe soll sich von Farbe gray85 auf Farbe gray72 ändern, wenn man mit der Maus auf <a> zeigt. Wir bereiten zunächst die Formatierung von <a> in Farbe gray85 vor.
Zum Beispiel legen wir bei <a> die Textfarbe auf Farbe gray85 fest.
<style type="text/css"><!-- a { color:gray85; } //--> </style>Jetzt stellen wir ein, dass sich bei Hover die Textfarbe zu gray72 ändert.
<style type="text/css"><!-- a:hover { color:gray72; } //--> </style>
Mehr zu a erfahren Sie in Verweise und Protokolle in HTML. Weiteres zum hier gezeigten HTML-Tag a ist in der HTML Referenz bei <a> beschrieben.
Hier ändern wir die Textfarbe von <ins> auf Farbe gray72. Die Schriftart setzen wir auf monospace und verringern die Schriftgröße auf 90%. Wir unterstreichen den Inhalt von <ins> mit Hilfe eines herausstehenden Rahmens mit 5 Pixel Dicke in Farbe gray85. Mit HTML ist das nicht machbar. Daher nutzen wir hier CSS.
<style type="text/css"><!-- ins { font-size: 90%; border-bottom-color: gray85; border-bottom-style: outset; font-family: monospace; border-bottom-width: 5px; color: gray72; } //--> </style>
Die Idee ist, unterschiedliche Formatierungen für Inhalt und Unterstreichung zu haben.
Der Befehl ins ist in der HTML Referenz unter <ins> genau zusammengestellt.