Template:Role: Difference between revisions
Jump to navigation
Jump to search
m switch to {{yesno}} |
Updating styling |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
<span | <span class="role {{yesno|{{{dark-background|}}}|yes=dark}}"><span class="roledot" style="background-color: {{{2|#c4c9ce}}};"></span> {{{1}}}</span> <templatestyles src="Template:Role/styles.css"/><noinclude>{{documentation}}</noinclude> |
Latest revision as of 01:25, 14 January 2024
{{{1}}}
This template displays a role in the same style Discord does when you click on a user. Like this
Parameters[edit source]
{{role|name|color|dark-background=yes}}
name
- The name of the role. This will be the text that will appear in the template.color
- The color of the role. Can be a hex code (you must include the #) or any other valid CSS color value. If not specified, defaults to #c4c9ce (the default appearance for non-colored roles).dark-background=
- Set this to "yes" to change the background color of the template to the dark color used on Discord profiles. Otherwise, the background will remain white (or whatever color the surrounding background is).
Example[edit source]
{{role|Was it worth it?|#eb2d37}}
outputs:
Was it worth it?
TemplateData[edit source]
Displays a role in the same style that Discord uses when you click on a user.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Role name | 1 | The name of the role. This will be the text that will appear.
| String | required |
Color | 2 | The color of the role. Can be a hex code (you must include the #, e.g. #ff7f00) or any other valid CSS color value.
| String | suggested |
Dark background | dark-background | Set this to "yes" to change the background color of the template to the dark color used on Discord profiles.
| String | optional |