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 | Schriftfarbwert #008000 | |||||
Detail | : | Hintergrund olive | Detail | : | Schrift #008000 | |
Farbe | : | olive | Farbwert | : | #008000 | |
Farbwert | : | #808000 | Farbe | : | green | |
HTML | : | olive | HTML | : | #008000 | |
HTML (Wert) | : | #808000 | HTML (Wert) | : | #008000 | |
CSS | : | olive | CSS | : | #008000 | |
CSS (Wert) | : | #808000 | CSS (Wert) | : | #008000 | |
CSS (kürzest) | : | #808000 | CSS (kürzest) | : | #008000 | |
CSS (RGB) | : | rgb(128,128,0) | CSS (RGB) | : | rgb(0,128,0) | |
CSS (%RGB) | : | rgb(50%,50%,0%) | CSS (%RGB) | : | rgb(0%,50%,0%) |
Verlauf Hintergrundfarbe olive nach Schriftfarbwert #008000 | |||||||
#808000 | #6d8000 | #5b8000 | #498000 | #368000 | #248000 | #128000 | #008000 |
#808000 | #6d8000 | #5b8000 | #498000 | #368000 | #248000 | #128000 | #008000 |
Kombination von olive und #008000 | |||||||
Cras vestibulum tristique erat, ac interdum justo cursus in. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam dapibus, lorem sed bibendum consectetur, ligula enim dignissim ligula, a ultrices dolor augue ultrices magna. Cras id velit ante. Suspendisse augue erat, auctor ut ultricies non, facilisis sed neque. | #008000 eignet sich nicht als Schriftfarbe auf Hintergrund olive, da sowohl Helligkeit als auch die Farben zu ähnlich sind. Die Ähnlichkeit der Farben #008000 und olive beträgt 94.17%. Die Lesbarkeit dieser Kombination bewerte ich mit 5.83%. |
Hintergrundfarbe olive | Schriftfarbwert #008000 | ||||||
Verlauf nach Weiß | Verlauf nach Schwarz | Verlauf nach Weiß | Verlauf nach Schwarz | ||||
#808000 | #808000 | #808000 | #808000 | #008000 | #008000 | #008000 | #008000 |
#929224 | #929224 | #6d6d00 | #6d6d00 | #249224 | #249224 | #006d00 | #006d00 |
#a4a448 | #a4a448 | #5b5b00 | #5b5b00 | #48a448 | #48a448 | #005b00 | #005b00 |
#b6b66d | #b6b66d | #494900 | #494900 | #6db66d | #6db66d | #004900 | #004900 |
#c8c891 | #c8c891 | #363600 | #363600 | #91c891 | #91c891 | #003600 | #003600 |
#dadab6 | #dadab6 | #242400 | #242400 | #b6dab6 | #b6dab6 | #002400 | #002400 |
#ececda | #ececda | #121200 | #121200 | #daecda | #daecda | #001200 | #001200 |
#ffffff | #ffffff | #000000 | #000000 | #ffffff | #ffffff | #000000 | #000000 |
Bei diesem Beispiel umranden wir <pre> mit einem 4 Punkte dicken, gestrichelten Rahmen in Farbwert #008000 . Den Hintergrund von <pre> setzen wir auf Farbe olive. Dies ist mit HTML nicht möglich. Daher verwenden wir hier CSS zur Formatierung.
<style type="text/css"><!-- pre { border:4pt dashed #008000; background-color:olive; } //--> </style>
Mehr zum Thema können Sie in Blockorientierte Elemente in HTML erfahren. Möglichkeiten vom HTML-Tag <pre>.
Wir ändern bei diesem Beispiel die Textfarbe von <strong> auf Farbwert #008000. Die Schriftart setzen wir auf courier new. Die Schriftgröße erhöhen wir auf 118%. Wir unterstreichen den Inhalt von <strong> mit Hilfe eines gefurchten Rahmens mit 4 Pixel Dicke in Farbe olive. In HTML geht dies kaum. Wir nutzen daher CSS zur Formatierung.
<style type="text/css"><!-- strong { border-bottom-style:groove; font-size:118%; color:#008000; font-family:courier new; border-bottom-color:olive; border-bottom-width:4px; } //--> </style>
Die Idee ist, unterschiedliche Formatierungen für Inhalt und Unterstreichung zu haben.
Mehr zum Thema können Sie in Text in HTML finden. Mehr zum Tag <strong>.
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 |