module Brice::Colours::Colour

Terminal escape codes for colours.

Constants

COLOURS

Public Instance Methods

[](key)
Alias for: escape
escape(key) click to toggle source

Return the escape code for a given colour.

# File lib/brice/colours.rb, line 230
def escape(key)
  "\033[#{COLOURS[key]}m" if COLOURS.key?(key)
end
Also aliased as: []