Skip to content

Instantly share code, notes, and snippets.

View iax7's full-sized avatar

Isaias Piña iax7

View GitHub Profile
@iax7
iax7 / color.rb
Last active December 30, 2023 00:35
Simple class to generate ANSI Color output
# @example basic usage
# Color.blue => "\e[1;34m"
# @example chain bold
# Color.red.bold => "\e[1;31m"
class Color
NORMAL = 30
BRIGHT = 90
BG_DIFF = 10
CODES = {
black: 0,