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

Template:Cell color

Template Discussion
  • Language
  • Watch
  • History
  • Edit
    • Page information
    • Permanent link
    • What links here
Template documentation[view] [edit] [history] [purge]
Shortcut
  • {{ccolor}}

This template creates a shaded table cell according to its value. It interpolates the colour between given min and max values and colors (if not specified, these are assumed to be white for the min and black for the max). The font colour is turned black or white depending on the luminosity of the cell background.

Usage

{{Cell color|value|min|max|min color|max color[}}

Parameters
  • |1= - The value of the cell (must be a number)
  • |2= - The minimum value of the range
  • |3= - The maximum value of the range
  • |4= - The color for the minimum value specified by |2=
  • |5= - The color for the maximum value specified by |3=
  • |bold= - Set to a truthy value to make the value bold

Example

{|
| {{Cell color|50|25|100|FF0000|0000FF}}
|}
50
{|
| {{Cell color|0.7|0|1|bold=yes}}
|}
0.7

See also

  • {{Value color}}
  • {{Shade}}
The above documentation is transcluded from Template:Cell color/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:Cell_color&oldid=7603"
Category:
  • Color templates
Last edited on 9 May 2021, at 17:26

MOASSpedia

Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • This page was last edited on 9 May 2021, at 17:26.
  • Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • Privacy policy
  • About MOASSpedia
  • Disclaimers
  • Desktop