Difference between revisions of "MDPalette"
From Sonic Retro
(a little nicer on the eye) |
(works with solid hex, for easy copy/paste from hex editors) |
||
Line 1: | Line 1: | ||
− | <includeonly> | + | <includeonly>{{#if:{{{size|}}}|{{#vardefine:colw|{{{size|}}}}}{{#vardefine:colh|{{{size|}}}}}| |
{{#if:{{{width|}}}|{{#vardefine:colw|{{{width|}}}}}|{{#vardefine:colw|24}}}}{{#if:{{{height|}}}|{{#vardefine:colw|{{{height|}}}}}|{{#vardefine:colh|24}}}} | {{#if:{{{width|}}}|{{#vardefine:colw|{{{width|}}}}}|{{#vardefine:colw|24}}}}{{#if:{{{height|}}}|{{#vardefine:colw|{{{height|}}}}}|{{#vardefine:colh|24}}}} | ||
}}<div style="max-width:{{#expr:{{#var:colw}}*16}}px;">{{#fornumargs: i | }}<div style="max-width:{{#expr:{{#var:colw}}*16}}px;">{{#fornumargs: i | ||
| value | | value | ||
− | | <div style="display:inline-block; background-color:#{{MDHex2HTMLHex|{{#sub:{{#var: | + | | {{#vardefine:rawdata|{{#replace:{{#var:value}}| }}}}{{#loop: j |
+ | | 0 | ||
+ | | {{#expr:{{#len:{{#var:rawdata}}}} div 4}} | ||
+ | | <div style="display:inline-block; background-color:#{{MDHex2HTMLHex|{{#sub:{{#var:rawdata}}|{{#expr:({{#var:j}}*4)+1}}|3}}}}; width:{{#var:colw}}px; hei<!-- -->ght:{{#var:colh}}px;"> </div> | ||
+ | }} | ||
}}</div></includeonly><noinclude> | }}</div></includeonly><noinclude> | ||
<pre> | <pre> | ||
Line 20: | Line 24: | ||
|0C82|0A02|0C42|0E86|0ECA|0EEC|0EEE|0EAC|0E8A|0E68|00E8|00A4|0002|0026|006C|00CE | |0C82|0A02|0C42|0E86|0ECA|0EEC|0EEE|0EAC|0E8A|0E68|00E8|00A4|0002|0026|006C|00CE | ||
}} | }} | ||
+ | |||
+ | {{hr}} | ||
+ | |||
+ | <pre>{{MDPalette|0000000008220A440C660E880EEE0AAA0888044408AE046A000E0008000400EE}}</pre> | ||
+ | |||
+ | returns: | ||
+ | |||
+ | {{MDPalette|0000000008220A440C660E880EEE0AAA0888044408AE046A000E0008000400EE}} | ||
</noinclude> | </noinclude> |
Revision as of 18:03, 20 April 2018
{{MDPalette |0800|0000|0242|0464|0686|08C8|0EEE|0AAA|0888|0444|08EA|046A|00EE|0088|0044|000E |0E80|0002|0EEE|0026|0048|006C|008E|00CE|0A86|0E86|0EA8|0ECA|0040|0060|00A4|00E8 |0C82|0A02|0C42|0E86|0ECA|0EEC|0EEE|0EAC|0E8A|0E68|00E8|00A4|0002|0026|006C|00CE }}
returns:
{{MDPalette|0000000008220A440C660E880EEE0AAA0888044408AE046A000E0008000400EE}}
returns: