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 insbesondere die unbunten Grundfarben Schwarz und Weiß.
Um 16 Graustufen in HTML bzw. CSS zu erzeugen, wählen wir Farbwerte rr, gg und bb mit Werten von 0 bis 15 (d.h. hexadezimal 0 bis f) für r, g und b.
Hintergrundfarbe gray119 | Schriftfarbe gray68 | |||||
Detail | : | Hintergrund gray119 | Detail | : | Schrift gray68 | |
Farbe | : | gray119 | Farbe | : | gray68 | |
Farbwert | : | #777777 | Farbwert | : | #444444 | |
HTML | : | gray119 | HTML | : | gray68 | |
HTML (Wert) | : | #777777 | HTML (Wert) | : | #444444 | |
CSS | : | gray119 | CSS | : | gray68 | |
CSS (Wert) | : | #777777 | CSS (Wert) | : | #444444 | |
CSS (kürzest) | : | #777 | CSS (kürzest) | : | #444 | |
CSS (RGB) | : | rgb(119,119,119) | CSS (RGB) | : | rgb(68,68,68) | |
CSS (%RGB) | : | rgb(46%,46%,46%) | CSS (%RGB) | : | rgb(26%,26%,26%) |
Verlauf Hintergrundfarbe gray119 nach Schriftfarbe gray68 | |||||||
#777777 | #6f6f6f | #686868 | #616161 | #595959 | #525252 | #4b4b4b | #444444 |
#777777 | #6f6f6f | #686868 | #616161 | #595959 | #525252 | #4b4b4b | #444444 |
Kombination von gray119 und gray68 | |||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vestibulum tristique erat, ac interdum justo cursus in. Suspendisse augue erat, auctor ut ultricies non, facilisis sed neque. Cras id velit ante. Aliquam dapibus, lorem sed bibendum consectetur, ligula enim dignissim ligula, a ultrices dolor augue ultrices magna. | gray68 ist nicht als Schriftfarbe auf Hintergrund gray119 geeignet, weil sich die Helligkeit und Farben zu ähnlich sind. Die Ähnlichkeit der Farben gray68 und gray119 ergibt sich zu 89.64%. Die Lesbarkeit dieser Kombination ergibt sich zu 10.36%. |
Hintergrundfarbe gray119 | Schriftfarbe gray68 | ||||||
Verlauf nach Weiß | Verlauf nach Schwarz | Verlauf nach Weiß | Verlauf nach Schwarz | ||||
#777777 | #777777 | #777777 | #777777 | #444444 | #444444 | #444444 | #444444 |
#8a8a8a | #8a8a8a | #666666 | #666666 | #5e5e5e | #5e5e5e | #3a3a3a | #3a3a3a |
#9d9d9d | #9d9d9d | #555555 | #555555 | #797979 | #797979 | #303030 | #303030 |
#b1b1b1 | #b1b1b1 | #444444 | #444444 | #949494 | #949494 | #262626 | #262626 |
#c4c4c4 | #c4c4c4 | #333333 | #333333 | #aeaeae | #aeaeae | #1d1d1d | #1d1d1d |
#d8d8d8 | #d8d8d8 | #222222 | #222222 | #c9c9c9 | #c9c9c9 | #131313 | #131313 |
#ebebeb | #ebebeb | #111111 | #111111 | #e4e4e4 | #e4e4e4 | #090909 | #090909 |
#ffffff | #ffffff | #000000 | #000000 | #ffffff | #ffffff | #000000 | #000000 |
Die Textfarbe soll sich von Farbe gray119 auf Farbe gray68 ändern, wenn man mit der Maus auf <em> zeigt. Bereiten wir zunächst eine Formatierung von <em> in Farbe gray119 vor.
Wir setzen für dieses Beispiel bei <em> die Textfarbe auf Farbe gray119.
<style type="text/css"><!-- em { color:gray119; } //--> </style>Jetzt fordern wir, dass bei Mausberührung die Textfarbe auf gray68 gesetzt wird.
<style type="text/css"><!-- em:hover { color:gray68; } //--> </style>
Mehr zum Thema finden Sie in Text in HTML. Weiteres zum hier genutzten Tag <em>.
Für dieses Beispiel ändern wir die Textfarbe von <col> auf Farbe gray68 und die Hintergrundfarbe von <col> auf Farbe gray119. Als Schriftart setzen wir monospace und setzen die Schriftgröße auf 13px.
<style type="text/css"><!-- col { background-color:gray119; color:gray68; font-family:monospace; font-size:13px; } //--> </style>
Weiteres zum Thema col lesen Sie in Tabellen in HTML. Mehr zum Tag <col>.