Difference between revisions of "Template:Hex3/doc"
Jump to navigation
Jump to search
imported>Verdy p m |
imported>Jonesey95 |
||
| (6 intermediate revisions by 5 users not shown) | |||
| Line 2: | Line 2: | ||
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE. --> | <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE. --> | ||
; Description of use | ; Description of use | ||
| − | : Converts three 8-bit numbers to hexadecimal. | + | : Converts three 8-bit numbers to hexadecimal. Useful for all sorts of color-related nefarious purposes. |
| − | + | : This template can be substituted. | |
; Input | ; Input | ||
:* three parameters, each numeric in the range 0..255 (larger numbers will wrap around) | :* three parameters, each numeric in the range 0..255 (larger numbers will wrap around) | ||
| − | :* < | + | :* <code>#=</code> ''(optional)'' allows you to change or remove the prefix for hex numbers (such as #) ; the default prefix is " #" (with a leading space to avoid the internal interpretation by MediaWiki as a numbered list item when returning the value from the template; this space does not alter the CSS validity of the value). |
| − | |||
; Output | ; Output | ||
| Line 14: | Line 13: | ||
; Examples | ; Examples | ||
| − | :* < | + | :* <code><nowiki>{{Hex3|0|0|0}}</nowiki></code>gives {{Hex3|0|0|0}} |
| − | :* < | + | :* <code><nowiki>{{subst:Hex3|0|0|0}}</nowiki></code> gives #000000 |
| − | :* < | + | :* <code><nowiki>{{Hex3|123|45|67}}</nowiki></code> gives {{Hex3|123|45|67}} |
| − | :* < | + | :* <code><nowiki>{{subst:Hex3|123|45|67}}</nowiki></code>gives #7B2D43 |
| − | :* < | + | :* <code><nowiki>{{Hex3|255|255|255}}</nowiki></code> gives {{Hex3|255|255|255}} |
| − | :* < | + | :* <code><nowiki>{{subst:Hex3|255|255|255}}</nowiki></code> gives #FFFFFF |
; See also | ; See also | ||
| Line 25: | Line 24: | ||
:* {{tl|Hex2}} if you don't want three all at once. | :* {{tl|Hex2}} if you don't want three all at once. | ||
| − | <includeonly> | + | <includeonly>{{Sandbox other|| |
[[Category:Color conversion templates|Hex3]] | [[Category:Color conversion templates|Hex3]] | ||
| − | + | [[dsb:Pśedłoga:Hex3]] | |
[[hsb:Předłoha:Hex3]] | [[hsb:Předłoha:Hex3]] | ||
| − | </includeonly > | + | [[id:Templat:Hex3]] |
| + | [[pt:Predefinição:Hex3]] | ||
| + | }}</includeonly> | ||
Latest revision as of 02:09, 3 June 2020
| This is a documentation subpage for Template:Hex3. It contains usage information, categories and other content that is not part of the original template page. |
- Description of use
- Converts three 8-bit numbers to hexadecimal. Useful for all sorts of color-related nefarious purposes.
- This template can be substituted.
- Input
-
- three parameters, each numeric in the range 0..255 (larger numbers will wrap around)
#=(optional) allows you to change or remove the prefix for hex numbers (such as #) ; the default prefix is " #" (with a leading space to avoid the internal interpretation by MediaWiki as a numbered list item when returning the value from the template; this space does not alter the CSS validity of the value).
- Output
-
- a triplet of two-digit hex numbers
- Examples
-
{{Hex3|0|0|0}}gives #000000{{subst:Hex3|0|0|0}}gives #000000{{Hex3|123|45|67}}gives #7B2D43{{subst:Hex3|123|45|67}}gives #7B2D43{{Hex3|255|255|255}}gives #FFFFFF{{subst:Hex3|255|255|255}}gives #FFFFFF
- See also