Template:Colourswatch
This box shows the colour blue. |
---|
This template puts a coloured box on the right side of the page under the caption "This box show the colour ..." See the example to the right.
There are two ways to use this template. You can use the template either with or without a special code.
Without a code
This box shows the colour red. |
---|
Some colours don't need any special code.
For example, if you type this on the page,
{{colourswatch|red}}
you will get a red box like the one to the right.
With a code
This box shows the colour amber. |
---|
Other colours do need a special code. The code that this template uses is called a "hex triplet".
A hex triplet is a six-digit, three-byte hexadecimal number used in HTML, CSS, and other computing applications, to represent colours.
First write the name of the colour. Next write the hex triplet (you don't need to write "#").
For example, if you type this on the page,
{{colourswatch|amber|FFBF00}}
you will get an amber box like the one to the right.
US English version
This box shows the color green. |
---|
If the page is written in US (American) English, please use {{colorswatch}}. This is the US English version of the template. You can use it in exactly the same way as this one.
For example, if you type this on the page,
{{colorswatch|green}}
you will get an green box like the one to the right. Notice how colour is spelt color.