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 purple | Schriftfarbe maroon | |||||
Detail | : | Hintergrund purple | Detail | : | Schrift maroon | |
Farbe | : | purple | Farbe | : | maroon | |
Farbwert | : | #800080 | Farbwert | : | #800000 | |
HTML | : | purple | HTML | : | maroon | |
HTML (Wert) | : | #800080 | HTML (Wert) | : | #800000 | |
CSS | : | purple | CSS | : | maroon | |
CSS (Wert) | : | #800080 | CSS (Wert) | : | #800000 | |
CSS (kürzest) | : | #800080 | CSS (kürzest) | : | #800000 | |
CSS (RGB) | : | rgb(128,0,128) | CSS (RGB) | : | rgb(128,0,0) | |
CSS (%RGB) | : | rgb(50%,0%,50%) | CSS (%RGB) | : | rgb(50%,0%,0%) |
Verlauf Hintergrundfarbe purple nach Schriftfarbe maroon | |||||||
#800080 | #80006d | #80005b | #800049 | #800036 | #800024 | #800012 | #800000 |
#800080 | #80006d | #80005b | #800049 | #800036 | #800024 | #800012 | #800000 |
Kombination von purple und maroon | |||||||
Cras id velit ante. 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 vestibulum tristique erat, ac interdum justo cursus in. Suspendisse augue erat, auctor ut ultricies non, facilisis sed neque. | maroon ist nicht als Schriftfarbe auf Hintergrund purple geeignet, weil weder der Helligkeitsunterschied noch der Farbunterschied gross genug sind. Die Ähnlichkeit von maroon und purple ergibt sich zu 94.46%. Die Lesbarkeit dieser Kombination ergibt sich zu 5.54%. |
Hintergrundfarbe purple | Schriftfarbe maroon | ||||||
Verlauf nach Weiß | Verlauf nach Schwarz | Verlauf nach Weiß | Verlauf nach Schwarz | ||||
#800080 | #800080 | #800080 | #800080 | #800000 | #800000 | #800000 | #800000 |
#922492 | #922492 | #6d006d | #6d006d | #922424 | #922424 | #6d0000 | #6d0000 |
#a448a4 | #a448a4 | #5b005b | #5b005b | #a44848 | #a44848 | #5b0000 | #5b0000 |
#b66db6 | #b66db6 | #490049 | #490049 | #b66d6d | #b66d6d | #490000 | #490000 |
#c891c8 | #c891c8 | #360036 | #360036 | #c89191 | #c89191 | #360000 | #360000 |
#dab6da | #dab6da | #240024 | #240024 | #dab6b6 | #dab6b6 | #240000 | #240000 |
#ecdaec | #ecdaec | #120012 | #120012 | #ecdada | #ecdada | #120000 | #120000 |
#ffffff | #ffffff | #000000 | #000000 | #ffffff | #ffffff | #000000 | #000000 |
Hier ändern wir die Textfarbe von <legend> auf Farbe maroon. Die Schriftart setzen wir auf arial und setzen die Schriftgröße auf 9pt. Wir unterstreichen den Inhalt von <legend> mit Hilfe eines herausstehenden Rahmens mit 1 Punkte Dicke in Farbe purple. Dies ist in HTML nicht möglich. Daher formatieren wir hier mit CSS.
<style type="text/css"><!-- legend { border-bottom-style: outset; color: maroon; font-family: arial; font-size: 9pt; border-bottom-color: purple; border-bottom-width: 1pt; } //--> </style>
Die Idee ist, unterschiedliche Formatierungen für Inhalt und Unterstreichung zu haben.
Weiteres zum Thema legend lesen Sie in Formulare in HTML. Möglichkeiten des Tag <legend>.
Die Farbe der Unterstreichung soll sich von Farbe purple auf Farbe maroon ändern, wenn man mit der Maus darauf zeigt. Wir bereiten zunächst die Formatierung von <abbr> in Farbe purple vor.
Beispielsweise unterstreichen wir <abbr> mit Hilfe eines herausstehenden Rahmens mit 5 Pixel Dicke in Farbe purple.
<style type="text/css"><!-- abbr { border-bottom-width: 5px; border-bottom-color: purple; border-bottom-style: outset; } //--> </style>Nun stellen wir ein, dass bei Berührung mit der Maus die Unterstreichungsfarbe auf maroon gesetzt wird.
<style type="text/css"><!-- abbr:hover { border-bottom-color:maroon; } //--> </style>
Die Idee ist hierbei, unabhängige Formatierungen für Inhalt und Unterstreichung zu nutzen. Manchmal sieht man diesen Effekt bei Hyperlinks. Der Text ist in einer Farbe. Die Unterstreichung in einer anderen. Dies ist aber keine "wirkliche" Unterstreichung, der Text selbst hat gar keine Unterstreichung. Sie wird mit einem Rahmen simuliert und dieser Rahmen ist unabhängig vom Text.
Möglichkeiten des hier genutzten Tag <abbr>.
Hintergrund | Farbwert | Farbe | und | Schrift | Farbwert | Farbkombination |
---|---|---|---|---|---|---|
aqua | #00ffff | + | aqua | #00ffff | aqua / purple | |
black | #000000 | + | black | #000000 | black / purple | |
blue | #0000ff | + | blue | #0000ff | blue / purple | |
fuchsia | #ff00ff | + | fuchsia | #ff00ff | fuchsia / purple | |
gray | #808080 | + | gray | #808080 | gray / purple | |
grey | #808080 | + | grey | #808080 | grey / purple | |
green | #008000 | + | green | #008000 | green / purple | |
lime | #00ff00 | + | lime | #00ff00 | lime / purple | |
maroon | #800000 | + | maroon | #800000 | maroon / purple | |
navy | #000080 | + | navy | #000080 | navy / purple | |
olive | #808000 | + | olive | #808000 | olive / purple | |
purple | #800080 | + | purple | #800080 | purple / purple | |
red | #ff0000 | + | red | #ff0000 | red / purple | |
silver | #c0c0c0 | + | silver | #c0c0c0 | silver / purple | |
teal | #008080 | + | teal | #008080 | teal / purple | |
white | #ffffff | + | white | #ffffff | white / purple | |
yellow | #ffff00 | + | yellow | #ffff00 | yellow / purple |