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.
Hintergrundfarbe olive | Schriftfarbe aqua | |||||
Detail | : | Hintergrund olive | Detail | : | Schrift aqua | |
Farbe | : | olive | Farbe | : | aqua | |
Farbwert | : | #808000 | Farbwert | : | #00ffff | |
HTML | : | olive | HTML | : | aqua | |
HTML (Wert) | : | #808000 | HTML (Wert) | : | #00ffff | |
CSS | : | olive | CSS | : | aqua | |
CSS (Wert) | : | #808000 | CSS (Wert) | : | #00ffff | |
CSS (kürzest) | : | #808000 | CSS (kürzest) | : | #0ff | |
CSS (RGB) | : | rgb(128,128,0) | CSS (RGB) | : | rgb(0,255,255) | |
CSS (%RGB) | : | rgb(50%,50%,0%) | CSS (%RGB) | : | rgb(0%,100%,100%) |
Verlauf Hintergrundfarbe olive nach Schriftfarbe aqua | |||||||
#808000 | #6d9224 | #5ba448 | #49b66d | #36c891 | #24dab6 | #12ecda | #00ffff |
#808000 | #6d9224 | #5ba448 | #49b66d | #36c891 | #24dab6 | #12ecda | #00ffff |
Kombination von olive und aqua | |||||||
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. Suspendisse augue erat, auctor ut ultricies non, facilisis sed neque. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras id velit ante. | Die Ähnlichkeit von aqua und olive beträgt 84.07%. Die Lesbarkeit dieser Kombination bewerte ich mit 15.93%. aqua eignet sich nicht als Schriftfarbe auf Hintergrund olive, da der Unterschied in den Helligkeiten nicht ausreichend ist |
Hintergrundfarbe olive | Schriftfarbe aqua | ||||||
Verlauf nach Weiß | Verlauf nach Schwarz | Verlauf nach Weiß | Verlauf nach Schwarz | ||||
#808000 | #808000 | #808000 | #808000 | #00ffff | #00ffff | #00ffff | #00ffff |
#929224 | #929224 | #6d6d00 | #6d6d00 | #24ffff | #24ffff | #00dada | #00dada |
#a4a448 | #a4a448 | #5b5b00 | #5b5b00 | #48ffff | #48ffff | #00b6b6 | #00b6b6 |
#b6b66d | #b6b66d | #494900 | #494900 | #6dffff | #6dffff | #009191 | #009191 |
#c8c891 | #c8c891 | #363600 | #363600 | #91ffff | #91ffff | #006d6d | #006d6d |
#dadab6 | #dadab6 | #242400 | #242400 | #b6ffff | #b6ffff | #004848 | #004848 |
#ececda | #ececda | #121200 | #121200 | #daffff | #daffff | #002424 | #002424 |
#ffffff | #ffffff | #000000 | #000000 | #ffffff | #ffffff | #000000 | #000000 |
Für dieses Beispiel umranden wir <center> mit einem . Die Hintergrundfarbe für <center> setzen wir auf Farbe olive. Mit HTML geht dies nicht. Daher formatieren wir mit CSS.
<style type="text/css"><!-- center { border:2px double aqua; background-color:olive; } //--> </style>
Mehr zum Thema center können Sie in Grundlegende Gestaltungselemente in HTML nachlesen. Mehr zum HTML-Tag center ist in der HTML Referenz bei <center> ausführlich gezeigt.
Die Rahmenfarbe soll sich von Farbe olive auf Farbe aqua ändern, wenn man mit der Maus darauf zeigt. Bereiten wir zunächst die Darstellung von <caption> in Farbe olive vor.
In diesem Beispiel umranden wir <caption> mit einem 2 Pixel dicken, doppelten Rahmen in Farbe olive.
<style type="text/css"><!-- caption { border-width:2px; border-style:double; border-color:olive; } //--> </style>Nun stellen wir ein, dass sich bei Mausberührung die Rahmenfarbe zu aqua ändert.
<style type="text/css"><!-- caption: hover { border-color: aqua; } //--> </style>
Weiteres zu caption finden Sie in Tabellen in HTML. Weiteres zum HTML-Befehl caption ist in der HTML Referenz unter <caption> beschrieben.
Hintergrund | Farbwert | Farbe | und | Schrift | Farbwert | Farbkombination |
---|---|---|---|---|---|---|
aqua | #00ffff | + | aqua | #00ffff | aqua / olive | |
black | #000000 | + | black | #000000 | black / olive | |
blue | #0000ff | + | blue | #0000ff | blue / olive | |
fuchsia | #ff00ff | + | fuchsia | #ff00ff | fuchsia / olive | |
gray | #808080 | + | gray | #808080 | gray / olive | |
grey | #808080 | + | grey | #808080 | grey / olive | |
green | #008000 | + | green | #008000 | green / olive | |
lime | #00ff00 | + | lime | #00ff00 | lime / olive | |
maroon | #800000 | + | maroon | #800000 | maroon / olive | |
navy | #000080 | + | navy | #000080 | navy / olive | |
olive | #808000 | + | olive | #808000 | olive / olive | |
purple | #800080 | + | purple | #800080 | purple / olive | |
red | #ff0000 | + | red | #ff0000 | red / olive | |
silver | #c0c0c0 | + | silver | #c0c0c0 | silver / olive | |
teal | #008080 | + | teal | #008080 | teal / olive | |
white | #ffffff | + | white | #ffffff | white / olive | |
yellow | #ffff00 | + | yellow | #ffff00 | yellow / olive |