Template:Web Color

From Zelda Wiki, the Zelda encyclopedia
Jump to navigation Jump to search

Purpose

Applies color to text given a hexadecimal color code or any other valid color value.

For use with Template:Cite only. To color in-game text, use Template:Color instead.

Avoid using this template for general styling. This template creates inline styles which are generally a bad practice in web design. Any color applied using this template will be the same on both light and dark themes, and will probably contrast poorly on at least one of them. The correct way to apply styles is with HTML classes and stylesheets (see MediaWiki:Fandomdesktop.css and MediaWiki:FandomMobile.css).

Usage

    {{Web Color|color |text }}

Examples

#InputOutput
1{{Web Color|#55d2e4|Spoilers ahead!}} Spoilers ahead!
2{{Web Color|green|foo}} foo
3{{Web Color|foo|bar}} bar
4{{Web Color||bar}} bar
5{{Web Color|foo}}