Difference between revisions of "MDPalette"
From Sonic Retro
(works with solid hex, for easy copy/paste from hex editors) |
(planning for animations) |
||
Line 3: | Line 3: | ||
}}<div style="max-width:{{#expr:{{#var:colw}}*16}}px;">{{#fornumargs: i | }}<div style="max-width:{{#expr:{{#var:colw}}*16}}px;">{{#fornumargs: i | ||
| value | | value | ||
− | | {{#vardefine:rawdata|{{#replace:{{#var:value}}| }}}}{{#loop: j | + | | {{#if:{{#pos:{{#var:value}}|:}} |
− | + | |<!-- Code for an animated palette would go here. --> | |
− | + | |{{#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> |
Revision as of 20:00, 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: