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 gray67 | Schriftfarbe gray93 | |||||
Detail | : | Hintergrund gray67 | Detail | : | Schrift gray93 | |
Farbe | : | gray67 | Farbe | : | gray93 | |
Farbwert | : | #434343 | Farbwert | : | #5d5d5d | |
HTML | : | gray67 | HTML | : | gray93 | |
HTML (Wert) | : | #434343 | HTML (Wert) | : | #5d5d5d | |
CSS | : | gray67 | CSS | : | gray93 | |
CSS (Wert) | : | #434343 | CSS (Wert) | : | #5d5d5d | |
CSS (kürzest) | : | #434343 | CSS (kürzest) | : | #5d5d5d | |
CSS (RGB) | : | rgb(67,67,67) | CSS (RGB) | : | rgb(93,93,93) | |
CSS (%RGB) | : | rgb(26%,26%,26%) | CSS (%RGB) | : | rgb(36%,36%,36%) |
Verlauf Hintergrundfarbe gray67 nach Schriftfarbe gray93 | |||||||
#434343 | #464646 | #4a4a4a | #4e4e4e | #515151 | #555555 | #595959 | #5d5d5d |
#434343 | #464646 | #4a4a4a | #4e4e4e | #515151 | #555555 | #595959 | #5d5d5d |
Kombination von gray67 und gray93 | |||||||
Aliquam dapibus, lorem sed bibendum consectetur, ligula enim dignissim ligula, a ultrices dolor augue ultrices magna. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse augue erat, auctor ut ultricies non, facilisis sed neque. Cras id velit ante. Cras vestibulum tristique erat, ac interdum justo cursus in. | Die Ähnlichkeit von gray93 und gray67 beträgt 92.85%. Die Lesbarkeit dieser Kombination von Farben ergibt sich zu 7.15%. gray93 ist nicht als Schriftfarbe auf Hintergrund gray67 geeignet. Sowohl Helligkeit als auch die Farben sind zu ähnlich. |
Hintergrundfarbe gray67 | Schriftfarbe gray93 | ||||||
Verlauf nach Weiß | Verlauf nach Schwarz | Verlauf nach Weiß | Verlauf nach Schwarz | ||||
#434343 | #434343 | #434343 | #434343 | #5d5d5d | #5d5d5d | #5d5d5d | #5d5d5d |
#5d5d5d | #5d5d5d | #393939 | #393939 | #747474 | #747474 | #4f4f4f | #4f4f4f |
#787878 | #787878 | #2f2f2f | #2f2f2f | #8b8b8b | #8b8b8b | #424242 | #424242 |
#939393 | #939393 | #262626 | #262626 | #a2a2a2 | #a2a2a2 | #353535 | #353535 |
#aeaeae | #aeaeae | #1c1c1c | #1c1c1c | #b9b9b9 | #b9b9b9 | #272727 | #272727 |
#c9c9c9 | #c9c9c9 | #131313 | #131313 | #d0d0d0 | #d0d0d0 | #1a1a1a | #1a1a1a |
#e4e4e4 | #e4e4e4 | #090909 | #090909 | #e7e7e7 | #e7e7e7 | #0d0d0d | #0d0d0d |
#ffffff | #ffffff | #000000 | #000000 | #ffffff | #ffffff | #000000 | #000000 |
Eine Überschrift setzen Sie mit Befehl <h3> und kann farblich gestaltet werden.
Hier ändern wir die Textfarbe von <h3> auf Farbe gray93 und die Hintergrundfarbe von <h3> auf Farbe gray67. Die Schriftart ändern wir auf monospace und verringern die Schriftgröße auf 87%.
<style type="text/css"><!-- h3 { color: gray93; font-size: 87%; background-color: gray67; font-family: monospace; } //--> </style>
Weiteres zu h3 können Sie in Grundlegende Gestaltungselemente in HTML nachlesen. Möglichkeiten des hier genutzten Befehl <h3>.
Wir ändern Hher die Textfarbe von <caption> auf Farbe gray93. Die Schriftart ändern wir auf arial. Die Schriftgröße verkleinern wir auf 97%. Wir unterstreichen den Inhalt von <caption> mit Hilfe eines einfallenden Rahmens mit 5 Pixel Dicke in Farbe gray67. Das ist mit HTML nicht möglich. Wir verwenden daher CSS.
<style type="text/css"><!-- caption { color: gray93; border-bottom-width: 5px; font-family: arial; border-bottom-style: inset; font-size: 97%; border-bottom-color: gray67; } //--> </style>
Die Idee ist, unterschiedliche Formatierungen für Inhalt und Unterstreichung zu haben.
Weiteres zum Thema caption erfahren Sie in Tabellen in HTML. Möglichkeiten vom Tag <caption>.