The template is used to display a box of a specific color and width. The color can be given as a code (r for red, b for blue…), as a named color (lightgray, purple…), or as a hex color #000 – #fff. The width is measured in units of em, and when not specified, 2 em is assumed. Parameter tc sets the text color (w for white, b for black, or any named/hex color).

Usage

edit

Syntax:

{{CWbox|text|width|color}}

or

{{CWbox|text|width|c= |tc= |styles= }}

|c= is for background color, |tc= is for text color


Color codes
  • T {{CWbox|T|4|r}}
  • T {{CWbox|T|4|g}}
  • T {{CWbox|T|4|b}}
  • T {{CWbox|T|4|y}}
  • T {{CWbox|T|4|o}}
  • T {{CWbox|T|4|v}}
Arbitrary box color, text color
  • txt {{CWbox|txt|4|#7bb|tc=w}}
Gradients
  • r6r5r4r3r2r1
  • b6b5b4b3b2b1
  • g6g5g4g3g2g1
Missing parameters
  •   {{CWbox|3=crimson}}
  •   {{CWbox|c=crimson}}
  •   {{CWbox|2=4|c=turquoise}}
Any additional CSS styles
  • txt {{CWbox|txt|4|g2|styles=border:1px solid red;border-radius:0 0 0.5em 0;text-align:left;}}
Primitive horizontal bar chart
One 834
Two ones 357
Three 15