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).
Hintergrundfarbwert #3b3b3b | Schriftfarbwert #cccccc | |||||
Detail | : | Hintergrund #3b3b3b | Detail | : | Schrift #cccccc | |
Farbwert | : | #3b3b3b | Farbwert | : | #cccccc | |
Farbe | : | gray59 | Farbe | : | gray204 | |
HTML | : | #3b3b3b | HTML | : | #cccccc | |
HTML (Wert) | : | #3b3b3b | HTML (Wert) | : | #cccccc | |
CSS | : | #3b3b3b | CSS | : | #cccccc | |
CSS (Wert) | : | #3b3b3b | CSS (Wert) | : | #cccccc | |
CSS (kürzest) | : | #3b3b3b | CSS (kürzest) | : | #ccc | |
CSS (RGB) | : | rgb(59,59,59) | CSS (RGB) | : | rgb(204,204,204) | |
CSS (%RGB) | : | rgb(23%,23%,23%) | CSS (%RGB) | : | rgb(80%,80%,80%) |
Verlauf Hintergrundfarbwert #3b3b3b nach Schriftfarbwert #cccccc | |||||||
#3b3b3b | #4f4f4f | #646464 | #797979 | #8d8d8d | #a2a2a2 | #b7b7b7 | #cccccc |
#3b3b3b | #4f4f4f | #646464 | #797979 | #8d8d8d | #a2a2a2 | #b7b7b7 | #cccccc |
Kombination von #3b3b3b und #cccccc | |||||||
Suspendisse augue erat, auctor ut ultricies non, facilisis sed neque. 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. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras id velit ante. | #cccccc eignet sich nicht als Schriftfarbe auf Hintergrund #3b3b3b, weil der Farbunterschied zu gering ist Die Ähnlichkeit der Farben #cccccc und #3b3b3b beträgt 66.78%. Die Lesbarkeit dieser Kombination liegt damit bei 33.22%. |
Hintergrundfarbwert #3b3b3b | Schriftfarbwert #cccccc | ||||||
Verlauf nach Weiß | Verlauf nach Schwarz | Verlauf nach Weiß | Verlauf nach Schwarz | ||||
#3b3b3b | #3b3b3b | #3b3b3b | #3b3b3b | #cccccc | #cccccc | #cccccc | #cccccc |
#575757 | #575757 | #323232 | #323232 | #d3d3d3 | #d3d3d3 | #aeaeae | #aeaeae |
#737373 | #737373 | #2a2a2a | #2a2a2a | #dadada | #dadada | #919191 | #919191 |
#8f8f8f | #8f8f8f | #212121 | #212121 | #e1e1e1 | #e1e1e1 | #747474 | #747474 |
#ababab | #ababab | #191919 | #191919 | #e9e9e9 | #e9e9e9 | #575757 | #575757 |
#c7c7c7 | #c7c7c7 | #101010 | #101010 | #f0f0f0 | #f0f0f0 | #3a3a3a | #3a3a3a |
#e3e3e3 | #e3e3e3 | #080808 | #080808 | #f7f7f7 | #f7f7f7 | #1d1d1d | #1d1d1d |
#ffffff | #ffffff | #000000 | #000000 | #ffffff | #ffffff | #000000 | #000000 |
Für dieses Beispiel ändern wir die Textfarbe von <label> auf Farbwert #cccccc und lassen die Hintergrundfarbe unverändert. Die Schriftart ändern wir auf courier new. Die Schriftgröße verringern wir auf 86%. Wir unterstreichen den Inhalt von <label> mit Hilfe eines doppelten Rahmens mit 4 Punkte Dicke in Farbwert #3b3b3b. Dies geht mit HTML nicht. Wir nutzen deshalb CSS zur Formatierung.
<style type="text/css"><!-- label { color: #cccccc; border-bottom-style: double; border-bottom-width: 4pt; border-bottom-color: #3b3b3b; font-size: 86%; font-family: courier new; } //--> </style>
Die Idee ist, unterschiedliche Formatierungen für Inhalt und Unterstreichung zu haben.
Weiteres zum Thema label können Sie in Formulare in HTML finden. Möglichkeiten des Befehl <label>.