Difference between revisions of "Template:Diagonal split color box/doc"
Jump to navigation
Jump to search
Adds a rectangular color box.
(Add example) |
(Add corner-background) |
||
| Line 60: | Line 60: | ||
"label": "Corner color", | "label": "Corner color", | ||
"description": "Sets the color of the top left text.", | "description": "Sets the color of the top left text.", | ||
| + | "example": "Yellow", | ||
| + | "type": "string", | ||
| + | "default": "Either black or white; whichever has greater contrast." | ||
| + | }, | ||
| + | "corner-background": { | ||
| + | "label": "Corner background", | ||
| + | "description": "Sets the background color of the top left text.", | ||
"example": "Yellow", | "example": "Yellow", | ||
"type": "string", | "type": "string", | ||
| Line 107: | Line 114: | ||
} | } | ||
}, | }, | ||
| − | "description": "<noexport><code>{{diagonal split color box|''left color''|''right color''|''left text''|''right text''|''left text color''|''right text color''|''corner=''|''corner-color=''|border=''|''border-width=''|''font=''|''font-size=''|''maximize=''|''no-diagonal=''}}</code><br></noexport>Adds a rectangular color box. <ul><li>Colors are most commonly specified as either a color keyword or as the [[Web colors#Hex triplet|hexadecimal triplet]] representing an RGB combination. See the article [[web colors]] for details.</li></ul>", | + | "description": "<noexport><code>{{diagonal split color box|''left color''|''right color''|''left text''|''right text''|''left text color''|''right text color''|''corner=''|''corner-color=''|''corner-background=''|''border=''|''border-width=''|''font=''|''font-size=''|''maximize=''|''no-diagonal=''}}</code><br></noexport>Adds a rectangular color box. <ul><li>Colors are most commonly specified as either a color keyword or as the [[Web colors#Hex triplet|hexadecimal triplet]] representing an RGB combination. See the article [[web colors]] for details.</li></ul>", |
"format": "inline" | "format": "inline" | ||
} }} | } }} | ||
| Line 208: | Line 215: | ||
| {{diagonal split color box|Yellow|#999|R|C|#f00|#0ff|font-size=0.7em|corner=B|corner-color=#00f}} || <code><nowiki>{{diagonal split color box|Yellow|#999|R|C|#f00|#0ff|font-size=0.7em|corner=B|corner-color=#00f}}</nowiki></code> | | {{diagonal split color box|Yellow|#999|R|C|#f00|#0ff|font-size=0.7em|corner=B|corner-color=#00f}} || <code><nowiki>{{diagonal split color box|Yellow|#999|R|C|#f00|#0ff|font-size=0.7em|corner=B|corner-color=#00f}}</nowiki></code> | ||
|- | |- | ||
| − | | {{diagonal split color box|green||E85|E85|font-size=0.7em|corner=P|corner-color=white}} || <code><nowiki>{{diagonal split color box|green||E85|E85|font-size=0.7em|corner=P|corner-color=white}}</nowiki></code> | + | | {{diagonal split color box|green||E85|E85|font-size=0.7em|corner=P|corner-color=white|corner-background=green}} || <code><nowiki>{{diagonal split color box|green||E85|E85|font-size=0.7em|corner=P|corner-color=white|corner-background=green}}</nowiki></code> |
|- | |- | ||
| {{diagonal split color box|green||E85|E85|font-size=0.61em}} || <code><nowiki>{{diagonal split color box|green||E85|E85|font-size=0.61em}}</nowiki></code> | | {{diagonal split color box|green||E85|E85|font-size=0.61em}} || <code><nowiki>{{diagonal split color box|green||E85|E85|font-size=0.61em}}</nowiki></code> | ||
Revision as of 23:04, 20 September 2019
| This is a documentation subpage for Template:Diagonal split color box. It contains usage information, categories and other content that is not part of the original template page. |
Contents
Usage
This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.
TemplateData for Diagonal split color box
{{diagonal split color box|left color|right color|left text|right text|left text color|right text color|corner=|corner-color=|corner-background=|border=|border-width=|font=|font-size=|maximize=|no-diagonal=}}Adds a rectangular color box.
- Colors are most commonly specified as either a color keyword or as the hexadecimal triplet representing an RGB combination. See the article web colors for details.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Left color | 1 | Left background color of the box.
| String | suggested |
| Right color | 2 | Right background color of the box.
| String | suggested |
| Left text | 3 | Adds text inside the left triangle; box otherwise has no text.
| String | suggested |
| Right text | 4 | Adds text inside the right triangle; otherwise it is empty.
| String | suggested |
| Left text color | 5 | Sets the color of the text inside the left triangle.
| String | suggested |
| Right text color | 6 | Sets the color of the text inside the right triangle.
| String | suggested |
| Corner | corner | Sets the top left text.
| String | optional |
| Corner color | corner-color | Sets the color of the top left text.
| String | optional |
| Corner background | corner-background | Sets the background color of the top left text.
| String | optional |
| Border color | border | Sets the color of the border around the box.
| String | optional |
| Border width | border-width | Sets the width of the border around the box.
| String | optional |
| Font | font | Sets the font size.
| String | optional |
| Font size | font-size | Sets the font size.
| String | optional |
| Maximize | maximize | Fits bigger font.
| String | optional |
| No diagonal | no-diagonal | Do not draw the diagonal.
| String | optional |
Format: inline
| Visual effect | Markup |
|---|---|
{{diagonal split color box}}
| |
{{diagonal split color box|Green}}
| |
{{diagonal split color box||Green}}
| |
{{diagonal split color box|Green|Green}}
| |
{{diagonal split color box|Green|border=Green}}
| |
{{diagonal split color box|Yellow|Blue}}
| |
C R |
{{diagonal split color box|||R|C|#f00|#0ff}}
|
C R |
{{diagonal split color box|Yellow|#999|R|C|#f00|#0ff}}
|
C R |
{{diagonal split color box|Yellow|#999|R|C|#f00|#0ff|no-diagonal=yes}}
|
R |
{{diagonal split color box|Yellow|#bbb|R|R|#f00|#f00}}
|
R |
{{diagonal split color box|Yellow|#bbb|R|R|#f00|#f00|no-diagonal=yes}}
|
C R |
{{diagonal split color box|#999|#999|R|C|#f00|#0ff}}
|
C R |
{{diagonal split color box|#999||R|C|#f00|#0ff}}
|
C R |
{{diagonal split color box||#999|R|C|#f00|#0ff}}
|
R R |
{{diagonal split color box|Yellow||R|R|#f00}}
|
R R |
{{diagonal split color box|Yellow||R|R||#f00}}
|
A R |
{{diagonal split color box|Yellow||R|A|#f00|#f00}}
|
R |
{{diagonal split color box|||R|R|#f00|#f00}}
|
R |
{{diagonal split color box|Yellow|Yellow|R|R|#f00|#f00}}
|
R |
{{diagonal split color box|Yellow||R|R|#f00|#f00}}
|
R |
{{diagonal split color box||Yellow|R|R|#f00|#f00}}
|
R |
{{diagonal split color box|Yellow||R||#f00}}
|
R |
{{diagonal split color box|Yellow|||R|#f00}}
|
R |
{{diagonal split color box|Yellow|||R||#f00}}
|
R |
{{diagonal split color box|#999||R|#f00|#f00}}
|
R |
{{diagonal split color box|#999|||R|#f00|#f00}}
|
R |
{{diagonal split color box|#999||R||#f00|#0ff}}
|
R |
{{diagonal split color box|#999|||R|#f00|#0ff}}
|
{{diagonal split color box|font-size=0.6em}}
| |
{{diagonal split color box|Yellow|font-size=0.6em}}
| |
{{diagonal split color box|LightGray|Yellow|font-size=0.6em}}
| |
{{diagonal split color box|LightGray|Yellow|font-size=0.6em|no-diagonal=yes}}
| |
C R |
{{diagonal split color box|Yellow|#999|R|C|#f00|#0ff|font-size=0.6em}}
|
R R |
{{diagonal split color box|Yellow||R|R|#f00|font-size=0.6em}}
|
R R |
{{diagonal split color box|Yellow||R|R||#f00|font-size=0.6em}}
|
R |
{{diagonal split color box|Yellow||R|font-size=0.6em}}
|
R |
{{diagonal split color box|Yellow|||R|font-size=0.6em}}
|
R |
{{diagonal split color box|Yellow||R|R|#f00|#f00|font-size=0.6em}}
|
R |
{{diagonal split color box|Yellow||R|R|#f00|#f00|maximize=yes}}
|
R |
{{diagonal split color box|Yellow|#bbb|R|R|#f00|#f00|maximize=yes}}
|
R |
{{diagonal split color box|Yellow|#bbb|R|R|#f00|#f00|maximize=yes|no-diagonal=yes}}
|
R |
{{diagonal split color box|Yellow|#bbb|R|R|#f00|#f00|font-size=1.2em|maximize=yes}}
|
R |
{{diagonal split color box|Yellow|#bbb|R|R|#f00|#f00|font-size=1.2em|maximize=yes|no-diagonal=yes}}
|
B R |
{{diagonal split color box|Yellow|#999|R|R|#f00|#f00|font-size=0.7em|corner=B|corner-color=#00f}}
|
C R |
{{diagonal split color box|Yellow|#999|R|C|#f00|#0ff|font-size=0.7em}}
|
BC R |
{{diagonal split color box|Yellow|#999|R|C|#f00|#0ff|font-size=0.7em|corner=B|corner-color=#00f}}
|
P E85 |
{{diagonal split color box|green||E85|E85|font-size=0.7em|corner=P|corner-color=white|corner-background=green}}
|
E85 |
{{diagonal split color box|green||E85|E85|font-size=0.61em}}
|
R |
{{diagonal split color box|Yellow||R|R|#f00|#f00|font-size=0.7em}}
|
R |
{{diagonal split color box|Yellow||R|R|#f00|#f00|font-size=1.2em|maximize=yes}}
|
R |
{{diagonal split color box|Yellow|#bbb|R|R|#f00|#f00|font-size=1.37em|maximize=yes}}
|
R |
{{diagonal split color box|Yellow|#bbb|R|R|#f00|#f00|font-size=1.37em|maximize=yes|no-diagonal=yes}}
|
C R |
{{diagonal split color box|Yellow|#999|R|C|#f00|#0ff|font-size=0.8em}}
|
R |
{{diagonal split color box|Yellow||R|R|#f00|#f00|font-size=0.8em}}
|
R |
{{diagonal split color box|Yellow||R|R|#f00|#f00|font-size=1.35em|maximize=yes}}
|
R |
{{diagonal split color box|Yellow||R|R|#f00|#f00|font-size=0.7em|maximize=yes}}
|
{{diagonal split color box|Yellow|border=Yellow|font-size=0.7em|maximize=yes}}
| |
R |
{{diagonal split color box|Yellow||R|R|#f00|#f00|font-size=0.6em|maximize=yes}}
|
{{diagonal split color box|Yellow|border=Yellow|font-size=0.6em|maximize=yes}}
| |
Red Blue |
{{diagonal split color box|LightGray|Yellow|Blue|Red|#00f|#f00}}
|
Red Blue |
{{diagonal split color box|LightGray|Yellow|Blue|Red|#00f|#f00|font=Helvetica, Sans-serif}}
|
Blue Red |
{{diagonal split color box|LightGray|Yellow|Red|Blue|#f00|#00f}}
|
Blue Red |
{{diagonal split color box|LightGray|Yellow|Red|Blue|#f00|#00f|font=Helvetica, Sans-serif}}
|
Default color for this text |
{{diagonal split color box|Green|Green|Default color for this text|Default color for this text|font=Helvetica, Sans-serif}}
|
Default color for this text |
{{diagonal split color box|Yellow|Blue|Default color for this text|font=Helvetica, Sans-serif}}
|
Default color for this text |
{{diagonal split color box|Yellow|Blue||Default color for this text|font=Helvetica, Sans-serif}}
|
Default color for this text |
{{diagonal split color box|Yellow|Blue|Default color for this text|Default color for this text|font=Helvetica, Sans-serif}}
|
Default color for this text |
{{diagonal split color box|Blue|Yellow|Default color for this text|Default color for this text|font=Helvetica, Sans-serif}}
|
Default color for right text Default color for left text |
{{diagonal split color box|Yellow|Blue|Default color for left text|Default color for right text|font=Helvetica, Sans-serif}}
|
Default color for right text Default color for left text |
{{diagonal split color box|Blue|Yellow|Default color for left text|Default color for right text|font=Helvetica, Sans-serif}}
|
Using X11 color names Using X11 color names |
{{diagonal split color box|SteelBlue|Coral|'''Using X11 color names'''|'''Using X11 color names'''|Gold|Silver|font=Helvetica, Sans-serif}}
|
Default color for this text Using RGB hex triplets |
{{diagonal split color box|#012345|#BA9876|''Using RGB hex triplet''|''Default color for this text''|#FEDCBA|font=Helvetica, Sans-serif}}
|
bordercolor like wikitable |
{{diagonal split color box|white|gray|bordercolor like wikitable|border=#A2A9B1|font=Helvetica, Sans-serif}}
|
Variants
| Template | Description | Example |
|---|---|---|
| {{Color box}} | a small color box with black borders and text color | or ORANGE |
| {{Color box striped}} | a striped version | |
| {{RouteBox}} | a borderless version with text color and wikilinks | Template:RouteBox |
| {{Colorbull}} | a colored bullet with wikilinks | ■ |
| {{Legend2}} | another borderless version | |
| {{Color sample}} | a small color box with black borders | |
| {{Swatch inline}} | Template:Swatch inline | |
| {{Background color}} | orange | |
| {{Rail color box}} | a version with more display options (part of Module:Adjacent stations) |
Template:Rcb, Template:Rcb, etc. |
| {{Diagonal split color box}} | a small color box split diagonally | |
| {{Motor type}} | A small color box corresponding to the motor type | Template:Motor type, etc. |
Supporting template
See also
- {{Infobox color}}, an infobox for the detailed description of a color.
- {{Legend}}
- {{Diagonal split header}}