Skip to content

Instantly share code, notes, and snippets.

@srcrip
Created November 18, 2017 18:22
Show Gist options
  • Save srcrip/8ad2e30d0f496120a7f6db45535d0b1e to your computer and use it in GitHub Desktop.
Save srcrip/8ad2e30d0f496120a7f6db45535d0b1e to your computer and use it in GitHub Desktop.
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