This is a documentation subpage for 模板:Colorbull. It may contain usage information, categories and other content that is not part of the original 模板 page. |
This template is used on approximately 4,700 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
This template inserts a colored bullet, with an optional wikilink. The bullet’s shape and size can also be changed.
Usage
{{colorbull|color|shape|wikilink|size=|description=}}
- Colors are most commonly specified as either a color keyword or as the hexadecimal triplet representing an RGB combination. See web colors for details. The default is black.
- Shape is optional; valid arguments are:
c / circle / r / round ● d / diamond ◆ tu / up / uptriangle ▲ td / dn / downtriangle ▼ tl / lt / lefttriangle ◀ tr / rt / righttriangle ▶ default ■
- The wikilink parameter is also optional and specifies the article to which the text should point.
- The named parameter size is a number specifying the bullet size as a % of the default style text size. Default is 100.
- The named parameter description replaces the default
color
tooltip. This is also heard by a screen reader.
Examples
Visual effect |
Markup |
---|---|
■ | {{colorbull}}
|
■ | {{colorbull|#039}}
|
■ | {{colorbull|size=50}}
|
● | {{colorbull|red|round}}
|
◆ | {{colorbull|green|d}}
|
▲ | {{colorbull||tu|triangle}}
|
See also
Template | Description | Example |
---|---|---|
{{Color box}}
|
Color box size with black borders and text color. Standard size. | 模板:Color box or 模板:Color box |
{{Color box striped}}
|
Striped color box. Standard size. | 模板:Color box striped |
{{RouteBox}}
|
Borderless color box with text color and wikilinks. | 模板:RouteBox |
{{Colorbull}}
|
Colored bullet with wikilinks. | ■ |
{{Legend inline}}
|
Color box size with black borders. Standard size. | 模板:Legend inline |
{{Color sample}}
|
Color box size with black borders. Smaller size. | 模板:Color sample |
{{Swatch inline}}
|
模板:Swatch inline | |
{{Background color}}
|
模板:Background color | |
{{Rail color box}}
|
A version with more display options. Part of Module:Adjacent stations | 模板:Rail color box, 模板:Rail color box |
{{Diagonal split color box}}
|
Color box split diagonally. Standard size. | 模板:Diagonal split color box |
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Colorbull in articles based on its TemplateData.
TemplateData for Colorbull
参数 | 描述 | 类型 | 状态 | |
---|---|---|---|---|
Color | 1 | Most commonly specified as either a color keyword or as the hexadecimal triplet representing an RGB combination. See the article web colors for details.
| 字符串 | 推荐 |
Shape | 2 | “c” or “circle” or “r” or “round” gives ●; “d” or “diamond” gives ◆; “tu” or “up” or “uptriangle” gives ▲; “td” or “dn” or “downtriangle” gives ▼; “tl” or “lt” or “lefttriangle” gives ◀; “tr” or “rt” or “righttriangle” gives ▶; default is ■
| 字符串 | 推荐 |
Link target | 3 | Optionally, a page name to link to. | 页面名称 | 可选 |
Size | size | The size of the bullet relative to surrounding text, as a percentage. Omit the % sign.
| 数字 | 可选 |
Description | description | When hovered over, this is also heard by a screen reader. This optional parameter can be used to change the default to something more user-friendly.
| 字符串 | 可选 |