Template:Color

From Savage Game Design Wiki
Revision as of 13:30, 17 May 2020 by Lou Montana (talk | contribs) (Template creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Sets text colour.

Usage

{{Color|colour|text|bgColour}}

  • colour (Optional, default inherit) CSS text 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)
  • text: the text to be coloured
  • bgColour (Optional): same as colour
Examples
Code Result
{{Color}}
{{Color|red}}
{{Color||text}} text
{{Color|red|text}} text
{{Color||text|yellow}} text
{{Color|red|text|yellow}} text
'''#{{Color|red|RR}}{{Color|green|GG}}{{Color|blue|BB}}''' #RRGGBB