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. The background color is generated by the {{[[Template:Value color |Value color ]]}} template.

{{Cell color|value|min|max|min color|max color[|bold=yes]}}

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.
  • |align= - The alignment of the text. Can be left, right, center, or justified. Set to right by default.
  • |style= - Any additional CSS to apply to the cell.

Example

demese
{|
| {{Cell color|50|25|100|FF0000|0000FF}}
|}
style="background-color:Tɛmpileti:Value color; color:;;text-align:right;font-weight:;" | 50
{|
| {{Cell color|0.7|0|1|bold=yes}}
|}
style="background-color:Tɛmpileti:Value color; color:;;text-align:right;font-weight:bold;" | 0.7

See also

demese
  • {{[[Template:Shade

|Shade ]]}}