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 gray45 | Schriftfarbe gray168 | |||||
Detail | : | Hintergrund gray45 | Detail | : | Schrift gray168 | |
Farbe | : | gray45 | Farbe | : | gray168 | |
Farbwert | : | #2d2d2d | Farbwert | : | #a8a8a8 | |
HTML | : | gray45 | HTML | : | gray168 | |
HTML (Wert) | : | #2d2d2d | HTML (Wert) | : | #a8a8a8 | |
CSS | : | gray45 | CSS | : | gray168 | |
CSS (Wert) | : | #2d2d2d | CSS (Wert) | : | #a8a8a8 | |
CSS (kürzest) | : | #2d2d2d | CSS (kürzest) | : | #a8a8a8 | |
CSS (RGB) | : | rgb(45,45,45) | CSS (RGB) | : | rgb(168,168,168) | |
CSS (%RGB) | : | rgb(17%,17%,17%) | CSS (%RGB) | : | rgb(65%,65%,65%) |
Verlauf Hintergrundfarbe gray45 nach Schriftfarbe gray168 | |||||||
#2d2d2d | #3e3e3e | #505050 | #616161 | #737373 | #848484 | #969696 | #a8a8a8 |
#2d2d2d | #3e3e3e | #505050 | #616161 | #737373 | #848484 | #969696 | #a8a8a8 |
Kombination von gray45 und gray168 | |||||||
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 id velit ante. Cras vestibulum tristique erat, ac interdum justo cursus in. Suspendisse augue erat, auctor ut ultricies non, facilisis sed neque. | Auf Hintergrund gray45 ist gray168 ungeeignet, weil die Helligkeit und Farben zu ähnlich sind. Die Ähnlichkeit von gray168 und gray45 beträgt 72.42%. Die Lesbarkeit dieser Kombination liegt damit bei 27.58%. |
Hintergrundfarbe gray45 | Schriftfarbe gray168 | ||||||
Verlauf nach Weiß | Verlauf nach Schwarz | Verlauf nach Weiß | Verlauf nach Schwarz | ||||
#2d2d2d | #2d2d2d | #2d2d2d | #2d2d2d | #a8a8a8 | #a8a8a8 | #a8a8a8 | #a8a8a8 |
#4b4b4b | #4b4b4b | #262626 | #262626 | #b4b4b4 | #b4b4b4 | #909090 | #909090 |
#696969 | #696969 | #202020 | #202020 | #c0c0c0 | #c0c0c0 | #787878 | #787878 |
#878787 | #878787 | #191919 | #191919 | #cdcdcd | #cdcdcd | #606060 | #606060 |
#a5a5a5 | #a5a5a5 | #131313 | #131313 | #d9d9d9 | #d9d9d9 | #484848 | #484848 |
#c3c3c3 | #c3c3c3 | #0c0c0c | #0c0c0c | #e6e6e6 | #e6e6e6 | #303030 | #303030 |
#e1e1e1 | #e1e1e1 | #060606 | #060606 | #f2f2f2 | #f2f2f2 | #181818 | #181818 |
#ffffff | #ffffff | #000000 | #000000 | #ffffff | #ffffff | #000000 | #000000 |
Hier ändern wir die Textfarbe von <acronym> auf Farbe gray168 und die Hintergrundfarbe von <acronym> auf Farbe gray45. Als Schriftart wählen wir courier new. Als Schriftgröße setzen wir 119%.
<style type="text/css"><!-- acronym { color: gray168; font-family: courier new; background-color: gray45; font-size: 119%; } //--> </style>
Zur Beschreibung des HTML-Tag <acronym>.
Wir ändern bei diesem Beispiel die Textfarbe von <label> auf Farbe gray168. Die Schriftart ändern wir auf monospace und setzen die Schriftgröße auf 84%. Wir unterstreichen den Inhalt von <label> mit Hilfe eines gepunkteten Rahmens mit 3 Pixel Dicke in Farbe gray45. Mit HTML geht das nicht. Deshalb formatieren wir mit CSS.
<style type="text/css"><!-- label { color:gray168; font-family:monospace; border-bottom:3px dotted gray45; font-size:84%; } //--> </style>
Die Idee ist, unterschiedliche Formatierungen für Inhalt und Unterstreichung zu haben.
Weiteres zum Thema label finden Sie in Formulare in HTML. Einzelheiten vom hier genutzten HTML-Tag label sind in der HTML Referenz unter <label> zusammengestellt.