# term-ansicolor-1.2.2 Documentation

## Description

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

## Installation

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

## Download

The latest version of this library can be downloaded at

- www.ping.de/~flori

The homepage of this library is located at

- flori.github.com/term-ansicolor

## 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 flori@ping.de

## License

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: www.gnu.org/copyleft/gpl.html

## Files

- README.rdoc

## Classes/Modules

- Term
- Term::ANSIColor
- Term::ANSIColor::Attribute
- Term::ANSIColor::PPMReader
- Term::ANSIColor::RGBColorMetrics
- Term::ANSIColor::RGBColorMetrics::CIELab
- Term::ANSIColor::RGBColorMetrics::CIELab::CIELabTriple
- Term::ANSIColor::RGBColorMetrics::CIEXYZ
- Term::ANSIColor::RGBColorMetrics::CIEXYZ::CIEXYZTriple
- Term::ANSIColor::RGBColorMetrics::CompuPhase
- Term::ANSIColor::RGBColorMetrics::Euclidean
- Term::ANSIColor::RGBColorMetrics::NTSC
- Term::ANSIColor::RGBColorMetrics::YUV
- Term::ANSIColor::RGBColorMetrics::YUV::YUVTriple
- Term::ANSIColor::RGBColorMetricsHelpers
- Term::ANSIColor::RGBColorMetricsHelpers::NormalizeRGBTriple
- Term::ANSIColor::RGBColorMetricsHelpers::WeightedEuclideanDistance
- Term::ANSIColor::RGBTriple

## Methods

- ::[] — Term::ANSIColor::RGBTriple
- ::[] — Term::ANSIColor::Attribute
- ::attributes — Term::ANSIColor::Attribute
- ::attributes — Term::ANSIColor
- ::coloring= — Term::ANSIColor
- ::coloring? — Term::ANSIColor
- ::create_color_method — Term::ANSIColor
- ::distance — Term::ANSIColor::RGBColorMetrics::NTSC
- ::distance — Term::ANSIColor::RGBColorMetrics::Euclidean
- ::distance — Term::ANSIColor::RGBColorMetrics::CompuPhase
- ::distance — Term::ANSIColor::RGBColorMetrics::YUV
- ::distance — Term::ANSIColor::RGBColorMetrics::CIELab
- ::distance — Term::ANSIColor::RGBColorMetrics::CIEXYZ
- ::from_array — Term::ANSIColor::RGBTriple
- ::from_hash — Term::ANSIColor::RGBTriple
- ::from_html — Term::ANSIColor::RGBTriple
- ::from_rgb_triple — Term::ANSIColor::RGBColorMetrics::YUV::YUVTriple
- ::from_rgb_triple — Term::ANSIColor::RGBColorMetrics::CIEXYZ::CIEXYZTriple
- ::from_rgb_triple — Term::ANSIColor::RGBColorMetrics::CIELab::CIELabTriple
- ::get — Term::ANSIColor::Attribute
- ::metric — Term::ANSIColor::RGBColorMetrics
- ::metric? — Term::ANSIColor::RGBColorMetrics
- ::metrics — Term::ANSIColor::RGBColorMetrics
- ::named_attributes — Term::ANSIColor::Attribute
- ::nearest_rgb_color — Term::ANSIColor::Attribute
- ::nearest_rgb_on_color — Term::ANSIColor::Attribute
- ::new — Term::ANSIColor::PPMReader
- ::new — Term::ANSIColor::RGBTriple
- ::new — Term::ANSIColor::Attribute
- ::rgb_colors — Term::ANSIColor::Attribute
- ::set — Term::ANSIColor::Attribute
- ::term_ansicolor_attributes — Term::ANSIColor
- #== — Term::ANSIColor::RGBTriple
- #apply — Term::ANSIColor::Attribute
- #attributes — Term::ANSIColor
- #background? — Term::ANSIColor::Attribute
- #blue — Term::ANSIColor::RGBTriple
- #code — Term::ANSIColor::Attribute
- #color — Term::ANSIColor
- #distance_to — Term::ANSIColor::RGBTriple
- #distance_to — Term::ANSIColor::Attribute
- #each_row — Term::ANSIColor::PPMReader
- #gradient_to — Term::ANSIColor::RGBTriple
- #gradient_to — Term::ANSIColor::Attribute
- #gray? — Term::ANSIColor::RGBTriple
- #gray? — Term::ANSIColor::Attribute
- #green — Term::ANSIColor::RGBTriple
- #html — Term::ANSIColor::RGBTriple
- #initialize_copy — Term::ANSIColor::RGBTriple
- #on_color — Term::ANSIColor
- #red — Term::ANSIColor::RGBTriple
- #reset_io — Term::ANSIColor::PPMReader
- #rgb_color? — Term::ANSIColor::Attribute
- #support? — Term::ANSIColor
- #term_ansicolor_attributes — Term::ANSIColor
- #to_a — Term::ANSIColor::RGBTriple
- #to_a — Term::ANSIColor::PPMReader
- #to_rgb_triple — Term::ANSIColor::Attribute
- #to_rgb_triple — Term::ANSIColor::RGBTriple
- #to_s — Term::ANSIColor::PPMReader
- #uncolor — Term::ANSIColor
- #uncolored — Term::ANSIColor
- #weighted_euclidean_distance_to — Term::ANSIColor::RGBColorMetricsHelpers::WeightedEuclideanDistance

[Validate]

Generated with the Darkfish Rdoc Generator 2.