Template:Horizontal Rule/doc
This template allows customizing the color of the <hr> tag.
Syntax
The template is written as {{Horizontal Rule|<background>}}. The background is the color name. It can be one of the following colors:
- red
- orange
- yellow
- green
- blue
- purple
- pink
Custom gradient colors
You can pick a different gradient color in the following way: {{Horizontal Rule|custom|<background>}}.
Make sure to use the RGB value for your color in the form of r,g,b.
If you want to use a HEX color but don't know the equivalent RGB value, you can use this convertor. For example:
{{Horizontal Rule|custom|255,0,0}}
Results a red gradient, that looks like this:
Other colors
You can use non-gradient colors as well using {{Horizontal Rule|other|<background>}}
On this case, the background can be a any color value (color name, HEX value, RGB value, HSLA value, etc.). For instance:
{{Horizontal Rule|other|cyan}}
Results:
Sources
This template is based on Simple Styles for <hr>'s, as published on css-tricks.com.
It was also published previously in the Scuba Wiki and the Templates Wiki.