Template:Color
From Wikipedia, the free encyclopedia
Page Template:Color/styles.css has no content.
Page Module:Documentation/styles.css has no content.
File:Test Template Info-Icon - Version (2).svg Template documentation[view] [edit] [history] [purge]
Script error: No such module "High-use".
Page Module:Message box/ombox.css has no content.| File:Ambox important.svg | Prose text intended for readers should never be manually colored. () |
Template:Uses TemplateStyles Template:Tl can be used to specify the foreground color of a span of text. Acceptable values are RGB hex codes, e.g. #C9E72A, or any of the web colors: red, blue, green, moccasin, darkorchid, etc. To set the background color of a span of text, use {{background color}}.
Usage
- Script error: No such module "Template link general".
For example:
{{color|red|Hello, world!}}→ Page Template:Color/styles.css has no content.Hello, world!{{color|#00F000|Hello, world!}}→ Page Template:Color/styles.css has no content.Hello, world!
If the second parameter is omitted, the color value is displayed as text:
{{color|#00F000}}→ Page Template:Color/styles.css has no content.#00F000{{color|red}}→ Page Template:Color/styles.css has no content.red
Using the Codex Design Style Guide for Wikimedia text colors:
{{color|var(--color-success, #177860)|'''Success'''}}→ Page Template:Color/styles.css has no content.Success{{color|var(--color-error, #bf3c2c)|'''Error'''}}→ Page Template:Color/styles.css has no content.Error{{color|var(--color-content-added, #006400)|'''Content added'''}}→ Page Template:Color/styles.css has no content.Content added{{color|var(--color-content-removed, #8b0000)|'''Content removed'''}}→ Page Template:Color/styles.css has no content.Content removed
Redirects
- Script error: No such module "Template link general".
- Script error: No such module "Template link general".
- Script error: No such module "Template link general".
- Script error: No such module "Template link general".
- Script error: No such module "Template link general".
See also
- {{resize}}
- {{colored link}}
- {{background color}}
- {{font color}} – allows setting both text and background color
- {{coltit}} – colored table header cell
- {{overcoloured}} – when color is used in a way that hides information from color-blind people
TemplateData
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. Template:Template parameter usage
TemplateData for Color
The color template can be used to add a span of text with any given text color
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Color | 1 | CSS name of color or hex code of color, e.g. 'red' or '#00F000'. | String | required |
| Text | 2 | The string of text to be formatted in the desired color | String | suggested |