Colorball – Template

From Bohemia Interactive Community
Revision as of 15:01, 10 May 2018 by Lou Montana (talk | contribs) (Page creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 - #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}} Template:colorball
{{colorball|orange}} Template:colorball
{{colorball|#FF5533|2}} Template:colorball

Source

<div style="
	background-color: COLOUR;
	border-radius: 50%;
	box-shadow: 0 0 3px 0 #888;
	display: inline-block;
	font-size: SIZE em;
	vertical-align: middle;
	height: 1em;
	width: 1em"></div>