ANSI Colour Guide

Hi, many days ago I created an ANSI colour guide for my own use:

#!/usr/bin/ruby -w
# Frozen_String_Literal: true
require 'io/console'
k, p = 15, 6

puts(
	6.times.map { 6.times.map { 6.times.map { (k += 1).to_s.then { |x| "\e[48;5;#{x}m" + x.center(p) + "\e[0m" } }.join } }
	.each_slice(STDOUT.winsize[1] / 36).map { |d| 6.times.map { |x| d.map { |y| y.at(x) }.join(?\s) }.join(?\n) + ?\n * 2 }
)

Are there any more colours that I can add?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs