Created
November 18, 2017 18:22
-
-
Save srcrip/8ad2e30d0f496120a7f6db45535d0b1e to your computer and use it in GitHub Desktop.
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
def self.color_test | |
ANSI.clear | |
ANSI.home | |
w, h = ANSI.size | |
str = "" | |
(0..w - 1).each do |x| | |
(0..h - 1).each do |y| | |
r = y | |
g = x | |
b = 75 + (y/2) | |
str += ANSI.bg_truecolor(r, g, b) + " " | |
end | |
str += "\n" | |
end | |
print str | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment