Last active
August 29, 2015 14:19
-
-
Save zaftzaft/b03dc99d9fdf42a6d7d4 to your computer and use it in GitHub Desktop.
ansi 256
This file contains hidden or 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 pad = function(n){ | |
| return n < 10 ? "00" + n : n < 100 ? "0" + n : n; | |
| } | |
| var x = 6; | |
| for(var i = 0;i < x;i++){ | |
| var s = ""; | |
| for(var c = 0;c < 240 / x;c++){ | |
| var d = i + (c * x) + 16; | |
| s += ("\x1b[38;5;" + d + "m" + pad(d)); | |
| } | |
| console.log(s); | |
| console.log("\x1b[39;49m"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment