Ruby library that colors strings using ANSI escape sequences
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
examples Doesn't have to be a class Jul 5, 2014
lib/term Bump version Sep 27, 2016
tests Extend colorized strings with Term::ANSIColor Sep 27, 2016
.gitignore Depend on tins-1.0.0 Feb 6, 2014
CHANGES Bump version Sep 27, 2016
COPYING Merge branch 'fix-copying' of May 12, 2014
Gemfile Stay 1.8 compatible Jul 5, 2014
README.rdoc Remove wrong executable bits. Mar 3, 2014
Rakefile Merge branch 'master' of Nov 13, 2015
VERSION Bump version Sep 27, 2016
term-ansicolor.gemspec Bump version Sep 27, 2016


Term::ANSIColor - ANSI escape sequences in Ruby


This library can be used to color/decolor strings using ANSI escape sequences.


Just type into the command line as root:

# ruby install.rb

Or if you prefer using Rake, try:

# rake install

Or if you want to use rubygems just type this and rubygems fetches the gem and installs it for you:

# gem install term-ansicolor


The latest version of this library can be downloaded at

The homepage of this library is located at


The following executables are provided with Term::ANSIColor:

  • cdiff: colors a diff patch

  • decolor: decolors any text file that was colored with ANSI escape sequences

  • colortab: Displays a table of the 256 terminal colors with their indices and nearest html equivalents.

  • term_display: displays a ppm3 or ppm6 image file in the terminal. If the netpbm programs are installed it can handle a lot of other image file formats.

  • term_mandel: displays the mandelbrot set in the terminal

Additionally the file examples/example.rb in the source/gem-distribution shows how this library can be used.


Florian Frank


This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Version 2 as published by the Free Software Foundation: