Last active
April 22, 2018 23:43
-
-
Save seleb/33884c2698bd3208db067601cf84cbcc to your computer and use it in GitHub Desktop.
Generates a random pico-8 palette
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a=[]; | |
for(var i = 0; i<16; ++i){ | |
a.push(i); | |
} | |
var b=[]; | |
while(a.length){ | |
b.push(a.splice(Math.floor(Math.random()*a.length),1)); | |
} | |
`{${b.join(',')}}`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment