Difference between revisions of "Template:Pseudo-decimal to hex"
Jump to navigation
Jump to search
Kevin Wang (talk | contribs) (Created page with "<onlyinclude>{{#vardefine:i|0}}{{#while:<!-- -->|{{#vardefineecho:s|{{#explode:{{{1|0.0.0}}}|.|{{#var:i}}}}}}<!-- -->|{{#vardefine:first|{{#expr:floor({{#var:s}} / 16)}}}}<!--...") |
Kevin Wang (talk | contribs) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<onlyinclude>{{#vardefine:i|0}}{{#while:<!-- | <onlyinclude>{{#vardefine:i|0}}{{#while:<!-- | ||
− | -->|{{#vardefineecho:s|{{#explode:{{{1|0.0.0}}}|.|{{#var:i}}}}}}<!-- | + | -->|{{#vardefineecho:s|{{#explode:{{{1|0.0.0}}}|.|{{#var:i}}}}}}{{#var:s}}<!-- |
-->|{{#vardefine:first|{{#expr:floor({{#var:s}} / 16)}}}}<!-- | -->|{{#vardefine:first|{{#expr:floor({{#var:s}} / 16)}}}}<!-- | ||
-->{{#vardefine:second|{{#expr:{{#var:s}} mod 16}}}}<!-- | -->{{#vardefine:second|{{#expr:{{#var:s}} mod 16}}}}<!-- | ||
Line 6: | Line 6: | ||
-->{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#var:second}}|10|a}}|11|b}}|12|c}}|13|d}}|14|e}}|15|f}}<!-- | -->{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#var:second}}|10|a}}|11|b}}|12|c}}|13|d}}|14|e}}|15|f}}<!-- | ||
-->{{#vardefine:i|{{#expr:{{#var:i}}+1}}}}}}</onlyinclude> | -->{{#vardefine:i|{{#expr:{{#var:i}}+1}}}}}}</onlyinclude> | ||
+ | |||
Shortcut [[Template:Dec to hex]]. | Shortcut [[Template:Dec to hex]]. | ||
+ | Inverse [[Template:Hex to pseudo-decimal]]. | ||
{| class="wikitable" | {| class="wikitable" |
Latest revision as of 16:46, 21 June 2022
000000
Shortcut Template:Dec to hex. Inverse Template:Hex to pseudo-decimal.
Input | Output |
---|---|
{{Pseudo-decimal to hex|0.0.0}} |
000000 |
{{Pseudo-decimal to hex|255.255.255}} |
ffffff |
{{Pseudo-decimal to hex|127.12.80}} |
7f0c50 |
{{Pseudo-decimal to hex|0.99.200}} |
0063c8 |