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 gray132 | Schriftfarbe gray184 | |||||
Detail | : | Hintergrund gray132 | Detail | : | Schrift gray184 | |
Farbe | : | gray132 | Farbe | : | gray184 | |
Farbwert | : | #848484 | Farbwert | : | #b8b8b8 | |
HTML | : | gray132 | HTML | : | gray184 | |
HTML (Wert) | : | #848484 | HTML (Wert) | : | #b8b8b8 | |
CSS | : | gray132 | CSS | : | gray184 | |
CSS (Wert) | : | #848484 | CSS (Wert) | : | #b8b8b8 | |
CSS (kürzest) | : | #848484 | CSS (kürzest) | : | #b8b8b8 | |
CSS (RGB) | : | rgb(132,132,132) | CSS (RGB) | : | rgb(184,184,184) | |
CSS (%RGB) | : | rgb(51%,51%,51%) | CSS (%RGB) | : | rgb(72%,72%,72%) |
Verlauf Hintergrundfarbe gray132 nach Schriftfarbe gray184 | |||||||
#848484 | #8b8b8b | #929292 | #9a9a9a | #a1a1a1 | #a9a9a9 | #b0b0b0 | #b8b8b8 |
#848484 | #8b8b8b | #929292 | #9a9a9a | #a1a1a1 | #a9a9a9 | #b0b0b0 | #b8b8b8 |
Kombination von gray132 und gray184 | |||||||
Suspendisse augue erat, auctor ut ultricies non, facilisis sed neque. Aliquam dapibus, lorem sed bibendum consectetur, ligula enim dignissim ligula, a ultrices dolor augue ultrices magna. Cras vestibulum tristique erat, ac interdum justo cursus in. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras id velit ante. | gray184 eignet sich nicht als Schriftfarbe auf Hintergrund gray132. Die Helligkeit und Farben sind zu ähnlich. Die Ähnlichkeit von gray184 und gray132 ergibt sich zu 91.02%. Die Lesbarkeit dieser Farbkombination ergibt sich zu 8.98%. |
Hintergrundfarbe gray132 | Schriftfarbe gray184 | ||||||
Verlauf nach Weiß | Verlauf nach Schwarz | Verlauf nach Weiß | Verlauf nach Schwarz | ||||
#848484 | #848484 | #848484 | #848484 | #b8b8b8 | #b8b8b8 | #b8b8b8 | #b8b8b8 |
#959595 | #959595 | #717171 | #717171 | #c2c2c2 | #c2c2c2 | #9d9d9d | #9d9d9d |
#a7a7a7 | #a7a7a7 | #5e5e5e | #5e5e5e | #cccccc | #cccccc | #838383 | #838383 |
#b8b8b8 | #b8b8b8 | #4b4b4b | #4b4b4b | #d6d6d6 | #d6d6d6 | #696969 | #696969 |
#cacaca | #cacaca | #383838 | #383838 | #e0e0e0 | #e0e0e0 | #4e4e4e | #4e4e4e |
#dbdbdb | #dbdbdb | #252525 | #252525 | #eaeaea | #eaeaea | #343434 | #343434 |
#ededed | #ededed | #121212 | #121212 | #f4f4f4 | #f4f4f4 | #1a1a1a | #1a1a1a |
#ffffff | #ffffff | #000000 | #000000 | #ffffff | #ffffff | #000000 | #000000 |
Die Textfarbe soll sich von Farbe gray132 auf Farbe gray184 ändern, wenn man mit der Maus darauf zeigt. Wir bereiten zunächst eine Formatierung von <p> in Farbe gray132 vor.
Für dieses Beispiel legen wir Farbe gray132 als Textfarbe von <p> fest. Die Hintergrundfarbe verändern wir nicht, ändern jedoch die Schriftart auf monospace.
<style type="text/css"><!-- p { color:gray132; font-family:monospace; } //--> </style>Nun fordern wir, dass bei Mausberührung die Textfarbe auf gray184 geändert wird.
<style type="text/css"><!-- p:hover { color:gray184; } //--> </style>
Weiteres zum Thema finden Sie in Grundlegende Gestaltungselemente in HTML. Möglichkeiten des hier gezeigten Befehl <p>.
Mit Tag <div> wird ein Universalkontainer erzeugt. Diesen können Sie farblich gestalten und hervorheben.
Hier ändern wir die Textfarbe von <div> auf Farbe gray184 und die Hintergrundfarbe von <div> auf Farbe gray132. Als Schriftart setzen wir arial. Die Schriftgröße setzen wir auf 13px.
<style type="text/css"><!-- div { color: gray184; font-size: 13px; font-family: arial; background-color: gray132; } //--> </style>
Einzelheiten vom HTML-Befehl <div>.