von Thomas Salvador.
Farben werden in HTML entweder mit ihrem Namen oder mit ihrem Wert beschrieben.
HTML verfügt seit jeher über 17 Standard Farbnamen.
Sie entstehen dadurch, dass die 8 Grundfarben jeweils maximal und zu 50% enthalten sind.
Zu diesen 16 Farben kommt mit grey eine alternative Schreibweise für gray.
Hintergrundfarbwert #c0c0c0 | Schriftfarbwert #ffff00 | |||||
Detail | : | Hintergrund #c0c0c0 | Detail | : | Schrift #ffff00 | |
Farbwert | : | #c0c0c0 | Farbwert | : | #ffff00 | |
Farbe | : | silver | Farbe | : | yellow | |
HTML | : | #c0c0c0 | HTML | : | #ffff00 | |
HTML (Wert) | : | #c0c0c0 | HTML (Wert) | : | #ffff00 | |
CSS | : | #c0c0c0 | CSS | : | #ffff00 | |
CSS (Wert) | : | #c0c0c0 | CSS (Wert) | : | #ffff00 | |
CSS (kürzest) | : | #c0c0c0 | CSS (kürzest) | : | #ff0 | |
CSS (RGB) | : | rgb(192,192,192) | CSS (RGB) | : | rgb(255,255,0) | |
CSS (%RGB) | : | rgb(75%,75%,75%) | CSS (%RGB) | : | rgb(100%,100%,0%) |
Verlauf Hintergrundfarbwert #c0c0c0 nach Schriftfarbwert #ffff00 | |||||||
#c0c0c0 | #c9c9a4 | #d2d289 | #dbdb6d | #e4e452 | #eded36 | #f6f61b | #ffff00 |
#c0c0c0 | #c9c9a4 | #d2d289 | #dbdb6d | #e4e452 | #eded36 | #f6f61b | #ffff00 |
Kombination von #c0c0c0 und #ffff00 | |||||||
Suspendisse augue erat, auctor ut ultricies non, facilisis sed neque. Cras id velit ante. 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. | #ffff00 ist nicht als Schriftfarbe auf Hintergrund #c0c0c0 geeignet, da sowohl Helligkeit als auch die Farben zu ähnlich sind. Die Ähnlichkeit von #ffff00 und #c0c0c0 beträgt 91.93%. Die Lesbarkeit dieser Kombination liegt damit bei 8.07%. |
Hintergrundfarbwert #c0c0c0 | Schriftfarbwert #ffff00 | ||||||
Verlauf nach Weiß | Verlauf nach Schwarz | Verlauf nach Weiß | Verlauf nach Schwarz | ||||
#c0c0c0 | #c0c0c0 | #c0c0c0 | #c0c0c0 | #ffff00 | #ffff00 | #ffff00 | #ffff00 |
#c9c9c9 | #c9c9c9 | #a4a4a4 | #a4a4a4 | #ffff24 | #ffff24 | #dada00 | #dada00 |
#d2d2d2 | #d2d2d2 | #898989 | #898989 | #ffff48 | #ffff48 | #b6b600 | #b6b600 |
#dbdbdb | #dbdbdb | #6d6d6d | #6d6d6d | #ffff6d | #ffff6d | #919100 | #919100 |
#e4e4e4 | #e4e4e4 | #525252 | #525252 | #ffff91 | #ffff91 | #6d6d00 | #6d6d00 |
#ededed | #ededed | #363636 | #363636 | #ffffb6 | #ffffb6 | #484800 | #484800 |
#f6f6f6 | #f6f6f6 | #1b1b1b | #1b1b1b | #ffffda | #ffffda | #242400 | #242400 |
#ffffff | #ffffff | #000000 | #000000 | #ffffff | #ffffff | #000000 | #000000 |
Hier ändern wir die Textfarbe von <blockquote> auf Farbwert #ffff00. Die Schriftart setzen wir auf monospace und setzen die Schriftgröße auf 13px. Wir unterstreichen den Inhalt von <blockquote> mit Hilfe eines gestrichelten Rahmens mit 1 Pixel Dicke in Farbwert #c0c0c0. Mit HTML geht dies kaum. Wir verwenden daher CSS zur Formatierung.
<style type="text/css"><!-- blockquote { font-size: 13px; font-family: monospace; color: #ffff00; border-bottom-width: 1px; border-bottom-color: #c0c0c0; border-bottom-style: dashed; } //--> </style>
Die Idee ist, unterschiedliche Formatierungen für Inhalt und Unterstreichung zu haben.
Mehr zum Thema blockquote können Sie in Blockorientierte Elemente in HTML nachlesen. Die Beschreibung vom hier genutzten HTML-Befehl blockquote finden Sie in der HTML Referenz unter <blockquote>.
Die Rahmenfarbe soll sich von Farbwert #c0c0c0 auf Farbwert #ffff00 ändern, wenn man mit der Maus auf <img> zeigt. Bereiten wir zunächst eine Formatierung von <img> in Farbwert #c0c0c0 vor.
In diesem Beispiel umranden wir <img> mit einem 4 Pixel dicken, gepunkteten Rahmen in Farbwert #c0c0c0.
<style type="text/css"><!-- img { border-color: #c0c0c0; border-width: 4px; border-style: dotted; } //--> </style>Jetzt fordern wir, dass bei Hover die Rahmenfarbe auf #ffff00 geändert wird.
<style type="text/css"><!-- img: hover { border-color: #ffff00; } //--> </style>
Weiteres zum Thema finden Sie in Grafik in HTML. Die Beschreibung des hier gezeigten Befehl img finden Sie in der HTML Referenz unter <img>.
Hintergrund | Farbwert | Farbe | und | Schrift | Farbwert | Farbkombination |
---|---|---|---|---|---|---|
aqua | #00ffff | + | aqua | #00ffff | aqua / #c0c0c0 | |
black | #000000 | + | black | #000000 | black / #c0c0c0 | |
blue | #0000ff | + | blue | #0000ff | blue / #c0c0c0 | |
fuchsia | #ff00ff | + | fuchsia | #ff00ff | fuchsia / #c0c0c0 | |
gray | #808080 | + | gray | #808080 | gray / #c0c0c0 | |
grey | #808080 | + | grey | #808080 | grey / #c0c0c0 | |
green | #008000 | + | green | #008000 | green / #c0c0c0 | |
lime | #00ff00 | + | lime | #00ff00 | lime / #c0c0c0 | |
maroon | #800000 | + | maroon | #800000 | maroon / #c0c0c0 | |
navy | #000080 | + | navy | #000080 | navy / #c0c0c0 | |
olive | #808000 | + | olive | #808000 | olive / #c0c0c0 | |
purple | #800080 | + | purple | #800080 | purple / #c0c0c0 | |
red | #ff0000 | + | red | #ff0000 | red / #c0c0c0 | |
silver | #c0c0c0 | + | silver | #c0c0c0 | silver / #c0c0c0 | |
teal | #008080 | + | teal | #008080 | teal / #c0c0c0 | |
white | #ffffff | + | white | #ffffff | white / #c0c0c0 | |
yellow | #ffff00 | + | yellow | #ffff00 | yellow / #c0c0c0 |