Project

toc

0.0
No commit activity in last 3 years
No release in over 3 years
Toc is a simple tool used for colouring outputs to the console.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

Toc (.to_c) Build Status Gem Version Coverage

Toc is a simple Ruby Gem allowing you to colour outputs to the console.

Inspiration

Toc inspired by tco and colored. It is written with simplicity and usability in mind.

Usage

To install Toc via RubyGems:

$ gem install toc

Full List of Colours:

  • Black
  • Red
  • Green
  • Yellow
  • Purple
  • Pink
  • Light Blue

All methods convert colour names to snake_case.

Forground Colour

puts 'Hello World'.red
puts 'Hello World'.yellow
puts 'Hello World'.green

Foreground Colour

Background Colour

puts 'Hello World'.red_on_black
puts 'Hello World'.black_on_light_blue
puts 'Hello World'.green_on_pink

Background Colour

Additional Styles

puts 'The text will be Bold!'.bold
puts 'The text will be Underlined!'.underline
puts 'The text will be Inversed!'.inverse

Styling