Colorball – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Displays a color ball.

Usage

{{Colorball|colour|size}}

  • color: (Optional, default #025D00) HTML colour, can be one of:
    • HTML colour name - red, darkgrey, etc.
    • HTML colour format - #RGB or #RRGGBB
    • rgb format - rgb(255, 0, 0)
    • rgba format - rgba(255, 0, 0, 0.5)
    • hsl format - hsl(120, 100%, 50%)
    • hsla format - hsla(120, 60%, 70%, 0.3)
  • size (Optional, default 1) size relative to font-size (em)
Examples
Code Result
{{Colorball}}
{{Colorball|orange}}
{{Colorball|#FF5533|2}}
{{Colorball|#F0F|8}}

Source

<div style="
	background-color: {{{1|#025D00}}};
	background: radial-gradient(circle at 0.25em 0.25em, #FFF, {{{1|#025D00}}}, #333);
	border-radius: 50%;
	box-shadow: 0 0 3px 0 #888;
	display: inline-block;
	font-size: {{{2|1}}}em;
	margin: 3px;
	vertical-align: middle;
	height: 1em;
	width: 1em"></div>