Created
October 28, 2012 23:03
-
-
Save d11wtq/3970335 to your computer and use it in GitHub Desktop.
ANSI Color Test Script
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
class AnsiColorTest | |
FG = 38 | |
BG = 48 | |
class << self | |
def label(n, type) | |
"\033[01;#{type};5;#{n}m %3s \033[0m" % n | |
end | |
def dump256 | |
(0..255).each {|n| puts label(n, FG) + " " + label(n, BG) } | |
end | |
end | |
end | |
AnsiColorTest.dump256 |
Author
d11wtq
commented
Oct 28, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment