Low commit activity in last 3 years
A long-lived project that still receives updates
This library uses ANSI escape sequences to control the attributes of terminal output
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 1.0
 Project Readme

Term::ANSIColor - ANSI escape sequences in Ruby

Description

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

Installation

Use rubygems to install the gem:

# gem install term-ansicolor

Download

The homepage of this library is located at

Examples

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.

Author

Florian Frank mailto:flori@ping.de

License

Apache License, Version 2.0 – See the COPYING file in the source archive.