Template:Colorbox

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

    

Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:Colorbox/doc.

No description yet available.

Usage

Legends and keys

The colorbox template is widely used to annotate complex tables in which editors have used color to group like entries. The editor uses the background-color style to color individual cells in the table and then adds a legend consisting of colorboxes at the beginning or end of the table explaining the meanings behind the color scheme. The editor should also add symbols like a caret (^), dagger/obelisk (†), double dagger/diesis (‡), or asterisk (*) to call attention to the different meanings, and make the table accessible for the color blind and in other cases where colors are not available (e.g. monochrome printing).

Text marker examples
Visual effect Markup
 ^  {{colorbox|#CEF2E0|^}}
 †  {{colorbox|#CEDFF2|†}}
 ‡  {{colorbox|#DDCEF2|‡}}
 *  {{colorbox|#F2E0CE|*}}

Note: The HTML code * must be used to create the asterisk as Wikipedia will treat the typed asterisk as an indented bullet point.

The template takes no parameters.

Additional information

The template is intended to be used in the following namespaces: no namespace specified

The template is intended to be used by the following user groups: no user group specified

See also

  • Template:Swatch
  • With {{Color}} also the color of the text can be defined (by the 1st parameter) - default like above
    • {{Colorbox|blue|text}} gives the same as
    {{Color|#000|bg=blue|  text  |css=border:1px solid #AAA}}
    • {{Colorbox|blue|link|w:}} gives the same as
    {{Color||bg=blue|[[w:link]]|  text  |css=border:1px solid #AAA}}

Localization

This template is not intended to be localized.

Examples

Examples
Visual effect Markup
     {{colorbox|Red}}
 Default color for this text  {{colorbox|Fuchsia|Default color for this text}}
 Wikilink to the article on Wikipedia  {{colorbox|Yellow|Wikilink to the article on Wikipedia|Wikipedia:}}
 Using an X11 color name  {{colorbox|Chartreuse|Using an '''{{W|X11 color names|X11 color name}}'''}}
 same color as "#DC2"  {{colorbox|Rgb(86.7% 80% 13.3%)|same color as "#DC2"}} = dez. 221-204-34
 Using RGB hex triplet  {{colorbox|#FEDCBA|''Using RGB hex triplet''|W:Web colors#Hex triplet}}
 Wikilink to the German Wikipedia  {{colorbox|#CFE|Wikilink to the {{Wd||German Wikipedia}}}}
 Wikilink to the German Wikipedia  {{Color|b|bg=#CFE| Wikilink to the {{Wd||German Wikipedia}} |css=border:1px solid #AAA}}