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 gray65 | Schriftfarbe gray41 | |||||
Detail | : | Hintergrund gray65 | Detail | : | Schrift gray41 | |
Farbe | : | gray65 | Farbe | : | gray41 | |
Farbwert | : | #414141 | Farbwert | : | #292929 | |
HTML | : | gray65 | HTML | : | gray41 | |
HTML (Wert) | : | #414141 | HTML (Wert) | : | #292929 | |
CSS | : | gray65 | CSS | : | gray41 | |
CSS (Wert) | : | #414141 | CSS (Wert) | : | #292929 | |
CSS (kürzest) | : | #414141 | CSS (kürzest) | : | #292929 | |
CSS (RGB) | : | rgb(65,65,65) | CSS (RGB) | : | rgb(41,41,41) | |
CSS (%RGB) | : | rgb(25%,25%,25%) | CSS (%RGB) | : | rgb(16%,16%,16%) |
Verlauf Hintergrundfarbe gray65 nach Schriftfarbe gray41 | |||||||
#414141 | #3d3d3d | #3a3a3a | #363636 | #333333 | #2f2f2f | #2c2c2c | #292929 |
#414141 | #3d3d3d | #3a3a3a | #363636 | #333333 | #2f2f2f | #2c2c2c | #292929 |
Kombination von gray65 und gray41 | |||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vestibulum tristique erat, ac interdum justo cursus in. 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 id velit ante. | gray41 eignet sich nicht als Schriftfarbe auf Hintergrund gray65. Die Helligkeit und Farben sind zu ähnlich. Die Ähnlichkeit von gray41 und gray65 beträgt 93.21%. Die Lesbarkeit dieser Kombination von Farben bewerte ich mit 6.79%. |
Hintergrundfarbe gray65 | Schriftfarbe gray41 | ||||||
Verlauf nach Weiß | Verlauf nach Schwarz | Verlauf nach Weiß | Verlauf nach Schwarz | ||||
#414141 | #414141 | #414141 | #414141 | #292929 | #292929 | #292929 | #292929 |
#5c5c5c | #5c5c5c | #373737 | #373737 | #474747 | #474747 | #232323 | #232323 |
#777777 | #777777 | #2e2e2e | #2e2e2e | #666666 | #666666 | #1d1d1d | #1d1d1d |
#929292 | #929292 | #252525 | #252525 | #848484 | #848484 | #171717 | #171717 |
#adadad | #adadad | #1b1b1b | #1b1b1b | #a3a3a3 | #a3a3a3 | #111111 | #111111 |
#c8c8c8 | #c8c8c8 | #121212 | #121212 | #c1c1c1 | #c1c1c1 | #0b0b0b | #0b0b0b |
#e3e3e3 | #e3e3e3 | #090909 | #090909 | #e0e0e0 | #e0e0e0 | #050505 | #050505 |
#ffffff | #ffffff | #000000 | #000000 | #ffffff | #ffffff | #000000 | #000000 |
Die Textfarbe soll sich von Farbe gray65 auf Farbe gray41 ändern, wenn man mit der Maus darauf zeigt. Wir bereiten zunächst die Darstellung von <option> in Farbe gray65 vor.
Zum Beispiel legen wir Farbe gray65 als Textfarbe von <option> fest:
<style type="text/css"><!-- option { color: gray65; } //--> </style>Jetzt fordern wir, dass sich bei Hover die Textfarbe auf gray41 ändert.
<style type="text/css"><!-- option: hover { color: gray41; } //--> </style>
Weiteres zum Thema finden Sie in Formulare in HTML. Beschreibung des hier gezeigten Befehl <option>.
Hier ändern wir die Textfarbe von <label> auf Farbe gray41. Die Schriftart setzen wir auf arial. Die Schriftgröße verringern wir auf 88%. Wir unterstreichen den Inhalt von <label> mit Hilfe eines gepunkteten Rahmens mit 3 Pixel Dicke in Farbe gray65. In HTML ist das kaum möglich. Daher verwenden wir CSS zur Formatierung.
<style type="text/css"><!-- label { color: gray41; font-size: 88%; font-family: arial; border-bottom-style: dotted; border-bottom-color: gray65; border-bottom-width: 3px; } //--> </style>
Die Idee ist, unterschiedliche Formatierungen für Inhalt und Unterstreichung zu haben.
Weiteres zu label können Sie in Formulare in HTML finden. Weiteres zum Befehl <label>.