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 yellow | |||||
Detail | : | Hintergrund olive | Detail | : | Schrift yellow | |
Farbe | : | olive | Farbe | : | yellow | |
Farbwert | : | #808000 | Farbwert | : | #ffff00 | |
HTML | : | olive | HTML | : | yellow | |
HTML (Wert) | : | #808000 | HTML (Wert) | : | #ffff00 | |
CSS | : | olive | CSS | : | yellow | |
CSS (Wert) | : | #808000 | CSS (Wert) | : | #ffff00 | |
CSS (kürzest) | : | #808000 | CSS (kürzest) | : | #ff0 | |
CSS (RGB) | : | rgb(128,128,0) | CSS (RGB) | : | rgb(255,255,0) | |
CSS (%RGB) | : | rgb(50%,50%,0%) | CSS (%RGB) | : | rgb(100%,100%,0%) |
Verlauf Hintergrundfarbe olive nach Schriftfarbe yellow | |||||||
#808000 | #929200 | #a4a400 | #b6b600 | #c8c800 | #dada00 | #ecec00 | #ffff00 |
#808000 | #929200 | #a4a400 | #b6b600 | #c8c800 | #dada00 | #ecec00 | #ffff00 |
Kombination von olive und yellow | |||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. 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. Suspendisse augue erat, auctor ut ultricies non, facilisis sed neque. | yellow ist nicht als Schriftfarbe auf Hintergrund olive geeignet. Weder der Helligkeitsunterschied noch der Farbunterschied sind ausreichend. Die Ähnlichkeit der Farben yellow und olive ergibt sich zu 81.40%. Die Lesbarkeit dieser Kombination von Farben liegt damit bei 18.60%. |
Hintergrundfarbe olive | Schriftfarbe yellow | ||||||
Verlauf nach Weiß | Verlauf nach Schwarz | Verlauf nach Weiß | Verlauf nach Schwarz | ||||
#808000 | #808000 | #808000 | #808000 | #ffff00 | #ffff00 | #ffff00 | #ffff00 |
#929224 | #929224 | #6d6d00 | #6d6d00 | #ffff24 | #ffff24 | #dada00 | #dada00 |
#a4a448 | #a4a448 | #5b5b00 | #5b5b00 | #ffff48 | #ffff48 | #b6b600 | #b6b600 |
#b6b66d | #b6b66d | #494900 | #494900 | #ffff6d | #ffff6d | #919100 | #919100 |
#c8c891 | #c8c891 | #363600 | #363600 | #ffff91 | #ffff91 | #6d6d00 | #6d6d00 |
#dadab6 | #dadab6 | #242400 | #242400 | #ffffb6 | #ffffb6 | #484800 | #484800 |
#ececda | #ececda | #121200 | #121200 | #ffffda | #ffffda | #242400 | #242400 |
#ffffff | #ffffff | #000000 | #000000 | #ffffff | #ffffff | #000000 | #000000 |
Mit Tag <a> wird ein Verweis erzeugt und kann farblich gestaltet und hervorgehoben werden.
In diesem Beispiel umranden wir <a> mit einem 5 Pixel dicken, herausstehenden Rahmen in Farbe yellow . Den Hintergrund von <a> färben wir mit Farbe olive. Dies geht in HTML nicht. Daher formatieren wir mit CSS.
<style type="text/css"><!-- a { border-color:yellow; border-width:5px; border-style:outset; background-color:olive; } //--> </style>
Mehr zu a lesen Sie in Verweise und Protokolle in HTML. Der hier verwendete Befehl a ist in der HTML Referenz unter <a> ausführlich beschrieben.
Für dieses Beispiel ändern wir die Textfarbe von <p> auf Farbe yellow und die Hintergrundfarbe von <p> auf Farbe olive. Als Schriftart setzen wir verdana. Als Schriftgröße entscheiden wir uns für 9pt.
<style type="text/css"><!-- p { color:yellow; background-color:olive; font-size:9pt; font-family:verdana; } //--> </style>
Weiteres zu p können Sie in Grundlegende Gestaltungselemente in HTML nachlesen. Mehr zum Tag p ist in der HTML Referenz bei <p> genau gezeigt.
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 |