• Home
  • Random
  • Recent changes
  • Special pages
  • Settings
  • About MOASSpedia
  • Disclaimers
MOASSpedia
  • 216.73.216.154
  • Talk
  • Watchlist
  • Contributions
  • Log in

Template:Color sample

Template Discussion
  • Language
  • Watch
  • History
  • Edit
    • Page information
    • Permanent link
    • What links here

 

Template documentation[view] [edit] [history] [purge]

Usage

  • {{Color sample|red}} →  
  • {{Color sample|#00FF00}} →  
  • {{Color sample|#00FF00|description=green}} →  
    Adds a description of the color for screen reader users
  • {{Color sample|{{party color|Independent politician}}}} →  
    (Instead of specifying a color directly, this example uses {{party color|Independent politician}}, which generates #DDDDDD.)

Note: When hovered over, the template shows the value used for color as a tooltip by default. This is also heard by a screen reader. An optional parameter, |description= can be used to change that to something more user-friendly, as shown in the third example.

See also

  • Template:Swatch inline
  • Template:Swatch
  • Lists of colors
The above documentation is transcluded from Template:Color sample/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://moasspedia.org/w/index.php?title=Template:Color_sample&oldid=9389"
Category:
  • Color templates
Last edited on 19 April 2019, at 18:40

MOASSpedia

Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • This page was last edited on 19 April 2019, at 18:40.
  • Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • Privacy policy
  • About MOASSpedia
  • Disclaimers
  • Desktop