Template:Decimal to hexadecimal converter: Difference between revisions

From TerraFirmaCraft Plus Wiki
Jump to navigation Jump to search
SpAnser (talk | contribs)
m 1 revision
 
Aliceingame (talk | contribs)
No edit summary
 
Line 33: Line 33:
  | 10 = A | 11 = B | 12 = C | 13 = D | 14 = E | 15 = F | {{#var:char1}}
  | 10 = A | 11 = B | 12 = C | 13 = D | 14 = E | 15 = F | {{#var:char1}}
}} }} | <strong class="error">String too long.</strong> }}</includeonly><noinclude>
}} }} | <strong class="error">String too long.</strong> }}</includeonly><noinclude>
{{/doc}}
{{doc}}
[[Category:Templates|D]]
[[Category:Templates|D]]
</noinclude>
</noinclude>

Latest revision as of 00:03, 17 May 2014

Template documentation (for the above template, sometimes hidden or invisible)

This is a simple to use tool for dynamically converting decimal values to hexadecimal values. It outputs in a 6 character hex format and so can take decimal numbers up to 16777215. The currently system implemented for truncating preceding 0's allows for outputs in 2, 3, and 6 character hex format based on the input.

Code

In full the template code is as follows:

{{Decimal to hexadecimal converter|1234}}

But it is much easier to use it through the redirect dec-hex which allows it to be written out as:

{{Dec-hex|1234}}

Both of which will output 4D2.