Difference between revisions of "Template:Hex2/doc"
Jump to navigation
Jump to search
imported>Borgx m (+id) |
imported>Jonesey95 |
||
| (4 intermediate revisions by 4 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 | + | : Converts an 8-bit number to hexadecimal using two digits, useful for formating RGB color components. |
| − | + | : This template can be substituted. | |
; Input | ; Input | ||
| − | :* | + | :* one parameter, numeric in the range 0..255 (larger numbers will wrap around) |
| − | |||
; Output | ; Output | ||
| Line 13: | Line 12: | ||
; Examples | ; Examples | ||
| − | :* < | + | :* <code><nowiki>{{Hex2|0}}</nowiki></code>gives {{Hex2|0}} |
| − | :* < | + | :* <code><nowiki>{{subst:Hex2|0}}</nowiki></code> gives 00 |
| − | :* < | + | :* <code><nowiki>{{Hex2|123}}</nowiki></code> gives {{Hex2|123}} |
| − | :* < | + | :* <code><nowiki>{{subst:Hex2|123}}</nowiki></code>gives 7B |
| − | :* < | + | :* <code><nowiki>{{Hex2|255}}</nowiki></code> gives {{Hex2|255}} |
| − | :* < | + | :* <code><nowiki>{{subst:Hex2|255}}</nowiki></code> gives FF |
; See also | ; See also | ||
:* {{tl|Hex3}} for formating 3 RGB components at once. | :* {{tl|Hex3}} for formating 3 RGB components at once. | ||
| − | <includeonly> | + | <includeonly>{{Sandbox other|| |
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> | <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> | ||
[[Category:Color conversion templates|Hex3]] | [[Category:Color conversion templates|Hex3]] | ||
[[id:Templat:Hex2]] | [[id:Templat:Hex2]] | ||
| − | </includeonly> | + | [[pt:Predefinição:Hex2]] |
| + | }}</includeonly> | ||
Latest revision as of 02:09, 3 June 2020
| This is a documentation subpage for Template:Hex2. It contains usage information, categories and other content that is not part of the original template page. |
- Description of use
- Converts an 8-bit number to hexadecimal using two digits, useful for formating RGB color components.
- This template can be substituted.
- Input
-
- one parameter, numeric in the range 0..255 (larger numbers will wrap around)
- Output
-
- a two-digit hex number
- Examples
-
{{Hex2|0}}gives 00{{subst:Hex2|0}}gives 00{{Hex2|123}}gives 7B{{subst:Hex2|123}}gives 7B{{Hex2|255}}gives FF{{subst:Hex2|255}}gives FF
- See also
-
- {{Hex3}} for formating 3 RGB components at once.