von Thomas Salvador.
Farben werden in HTML entweder mit ihrem Namen oder mit ihrem Wert beschrieben.
Netscape führte seinerzeit die websicheren Farben ein. Neben diesen Farbwerten, die einem bestimmten Schema folgen, definierte man noch 120 Werte und ordnete ihnen Namen zu.
Hintergrundfarbe mediumvioletred | Schriftfarbe mediumaquamarine | |||||
Detail | : | Hintergrund mediumvioletred | Detail | : | Schrift mediumaquamarine | |
Farbe | : | mediumvioletred | Farbe | : | mediumaquamarine | |
Farbwert | : | #c71585 | Farbwert | : | #66cdaa | |
HTML | : | mediumvioletred | HTML | : | mediumaquamarine | |
HTML (Wert) | : | #c71585 | HTML (Wert) | : | #66cdaa | |
CSS | : | mediumvioletred | CSS | : | mediumaquamarine | |
CSS (Wert) | : | #c71585 | CSS (Wert) | : | #66cdaa | |
CSS (kürzest) | : | #c71585 | CSS (kürzest) | : | #66cdaa | |
CSS (RGB) | : | rgb(199,21,133) | CSS (RGB) | : | rgb(102,205,170) | |
CSS (%RGB) | : | rgb(78%,8%,52%) | CSS (%RGB) | : | rgb(40%,80%,66%) |
Verlauf Hintergrundfarbe mediumvioletred nach Schriftfarbe mediumaquamarine | |||||||
#c71585 | #b92f8a | #ab498f | #9d6394 | #8f7e9a | #81989f | #73b2a4 | #66cdaa |
#c71585 | #b92f8a | #ab498f | #9d6394 | #8f7e9a | #81989f | #73b2a4 | #66cdaa |
Kombination von mediumvioletred und mediumaquamarine | |||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse augue erat, auctor ut ultricies non, facilisis sed neque. 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. Cras id velit ante. | Auf Hintergrund mediumvioletred ist mediumaquamarine ungeeignet. Sowohl Helligkeit als auch die Farben sind sich zu ähnlich. Die Ähnlichkeit der Farben mediumaquamarine und mediumvioletred ergibt sich zu 86.63%. Die Lesbarkeit dieser Farbkombination ergibt sich zu 13.37%. |
Hintergrundfarbe mediumvioletred | Schriftfarbe mediumaquamarine | ||||||
Verlauf nach Weiß | Verlauf nach Schwarz | Verlauf nach Weiß | Verlauf nach Schwarz | ||||
#c71585 | #c71585 | #c71585 | #c71585 | #66cdaa | #66cdaa | #66cdaa | #66cdaa |
#cf3696 | #cf3696 | #aa1272 | #aa1272 | #7bd4b6 | #7bd4b6 | #57af91 | #57af91 |
#d757a7 | #d757a7 | #8e0f5f | #8e0f5f | #91dbc2 | #91dbc2 | #489279 | #489279 |
#df79b9 | #df79b9 | #710c4c | #710c4c | #a7e2ce | #a7e2ce | #3a7561 | #3a7561 |
#e79aca | #e79aca | #550939 | #550939 | #bde9da | #bde9da | #2b5748 | #2b5748 |
#efbcdc | #efbcdc | #380626 | #380626 | #d3f0e6 | #d3f0e6 | #1d3a30 | #1d3a30 |
#f7dded | #f7dded | #1c0313 | #1c0313 | #e9f7f2 | #e9f7f2 | #0e1d18 | #0e1d18 |
#ffffff | #ffffff | #000000 | #000000 | #ffffff | #ffffff | #000000 | #000000 |
Mit HTML-Tag <a> wird ein Verweis erzeugt. Diesen kann man farblich gestalten.
Die Hintergrundfarbe soll sich von Farbe mediumvioletred auf Farbe mediumaquamarine ändern, wenn man mit der Maus auf <a> zeigt. Wir bereiten zunächst eine Formatierung von <a> in Farbe mediumvioletred vor.
Zum Beispiel ändern wir die Hintergrundfarbe von <a> auf Farbe mediumvioletred.
<style type="text/css"><!-- a { background-color:mediumvioletred; } //--> </style>Jetzt fordern wir, dass bei Berührung mit der Maus die Hintergrundfarbe auf mediumaquamarine geändert wird.
<style type="text/css"><!-- a: hover { background-color: mediumaquamarine; } //--> </style>
Weiteres zum Thema a finden Sie in Verweise und Protokolle in HTML. Mehr zum HTML-Tag <a>.
Bei diesem Beispiel ändern wir die Textfarbe von <fieldset> auf Farbe mediumaquamarine und lassen die Hintergrundfarbe unverändert. Die Schriftart ändern wir auf courier new. Die Schriftgröße setzen wir auf 112%. Wir unterstreichen den Inhalt von <fieldset> mit Hilfe eines gestrichelten Rahmens mit 4 Pixel Dicke in Farbe mediumvioletred. Mit HTML ist dies nicht machbar. Wir nutzen deshalb CSS zur Formatierung.
<style type="text/css"><!-- fieldset { font-family:courier new; border-bottom-width:4px; border-bottom-color:mediumvioletred; color:mediumaquamarine; border-bottom-style:dashed; font-size:112%; } //--> </style>
Die Idee ist, unterschiedliche Formatierungen für Inhalt und Unterstreichung zu haben.
Mehr zu fieldset können Sie in Formulare in HTML nachsehen. Beschreibung des HTML-Befehl <fieldset>.