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 gray168 | Schriftfarbwert #999999 | |||||
Detail | : | Hintergrund gray168 | Detail | : | Schrift #999999 | |
Farbe | : | gray168 | Farbwert | : | #999999 | |
Farbwert | : | #a8a8a8 | Farbe | : | gray153 | |
HTML | : | gray168 | HTML | : | #999999 | |
HTML (Wert) | : | #a8a8a8 | HTML (Wert) | : | #999999 | |
CSS | : | gray168 | CSS | : | #999999 | |
CSS (Wert) | : | #a8a8a8 | CSS (Wert) | : | #999999 | |
CSS (kürzest) | : | #a8a8a8 | CSS (kürzest) | : | #999 | |
CSS (RGB) | : | rgb(168,168,168) | CSS (RGB) | : | rgb(153,153,153) | |
CSS (%RGB) | : | rgb(65%,65%,65%) | CSS (%RGB) | : | rgb(60%,60%,60%) |
Verlauf Hintergrundfarbe gray168 nach Schriftfarbwert #999999 | |||||||
#a8a8a8 | #a5a5a5 | #a3a3a3 | #a1a1a1 | #9f9f9f | #9d9d9d | #9b9b9b | #999999 |
#a8a8a8 | #a5a5a5 | #a3a3a3 | #a1a1a1 | #9f9f9f | #9d9d9d | #9b9b9b | #999999 |
Kombination von gray168 und #999999 | |||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. 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. Cras vestibulum tristique erat, ac interdum justo cursus in. Cras id velit ante. | Die Ähnlichkeit der Farben #999999 und gray168 ergibt sich zu 94.29%. Die Lesbarkeit dieser Kombination von Farben bewerte ich mit 5.71%. #999999 ist nicht als Schriftfarbe auf Hintergrund gray168 geeignet, weil weder der Helligkeitsunterschied noch der Farbunterschied gross genug sind. |
Hintergrundfarbe gray168 | Schriftfarbwert #999999 | ||||||
Verlauf nach Weiß | Verlauf nach Schwarz | Verlauf nach Weiß | Verlauf nach Schwarz | ||||
#a8a8a8 | #a8a8a8 | #a8a8a8 | #a8a8a8 | #999999 | #999999 | #999999 | #999999 |
#b4b4b4 | #b4b4b4 | #909090 | #909090 | #a7a7a7 | #a7a7a7 | #838383 | #838383 |
#c0c0c0 | #c0c0c0 | #787878 | #787878 | #b6b6b6 | #b6b6b6 | #6d6d6d | #6d6d6d |
#cdcdcd | #cdcdcd | #606060 | #606060 | #c4c4c4 | #c4c4c4 | #575757 | #575757 |
#d9d9d9 | #d9d9d9 | #484848 | #484848 | #d3d3d3 | #d3d3d3 | #414141 | #414141 |
#e6e6e6 | #e6e6e6 | #303030 | #303030 | #e1e1e1 | #e1e1e1 | #2b2b2b | #2b2b2b |
#f2f2f2 | #f2f2f2 | #181818 | #181818 | #f0f0f0 | #f0f0f0 | #151515 | #151515 |
#ffffff | #ffffff | #000000 | #000000 | #ffffff | #ffffff | #000000 | #000000 |
Hier ändern wir die Textfarbe von <input> auf Farbwert #999999 und die Hintergrundfarbe von <input> auf Farbe gray168. Die Schriftart setzen wir auf sans-serif. Als Schriftgröße setzen wir 11pt.
<style type="text/css"><!-- input { color: #999; font-size: 11pt; background-color: gray168; font-family: sans-serif; } //--> </style>
Weiteres zum Thema input können Sie in Formulare in HTML erfahren. Zur Beschreibung vom HTML-Befehl <input>.
Die Rahmenfarbe soll sich von Farbe gray168 auf Farbwert #999999 ändern, wenn man mit der Maus auf <label> zeigt. Wir bereiten zunächst die Formatierung von <label> in Farbe gray168 vor.
In diesem Beispiel umranden wir <label> mit einem 4 Pixel dicken, doppelten Rahmen in Farbe gray168.
<style type="text/css"><!-- label { border-style:double; border-color:gray168; border-width:4px; } //--> </style>Jetzt fordern wir, dass sich bei Mausberührung die Rahmenfarbe auf #999999 ändert.
<style type="text/css"><!-- label:hover { border-color:#999999; } //--> </style>
Weiteres zum Thema können Sie in Formulare in HTML finden. Weiteres zum hier verwendeten HTML-Tag <label>.