[ Tcllib Home | Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]

term::ansi::code::attr(n) 0.1 tcllib "Terminal control"


term::ansi::code::attr - ANSI attribute sequences

Table Of Contents



This package provides symbolic names for the ANSI attribute control codes. For each control code a single command is provided which returns this code as its result. None of the commands of this package write to a channel; that is handled by higher level packages, like term::ansi::send.




This command is for introspection. It returns as its result a list containing the names of all attribute commands.

::term::ansi::code::attr::import ?ns? ?arg...?

This command imports some or all attribute commands into the namespace ns. This is by default the namespace attr. Note that this is relative namespace name, placing the imported command into a child of the current namespace. By default all commands are imported, this can howver be restricted by listing the names of the wanted commands after the namespace argument.



Set text color to Black.


Set text color to Red.


Set text color to Green.


Set text color to Yellow.


Set text color to Blue.


Set text color to Magenta.


Set text color to Cyan.


Set text color to White.


Set default text color (Black).


Set background to Black.


Set background to Red.


Set background to Green.


Set background to Yellow.


Set background to Blue.


Set background to Magenta.


Set background to Cyan.


Set background to White.


Set default background (Transparent).


Bold on.


Dim on.


Italics on.


Underscore on.


Blink on.


Reverse on.


Hidden on.


Strike-through on.


Bold off.


Italics off.


Underscore off.


Blink off.


Reverse off.


Hidden off.


Strike-through off.


Reset all attributes to their default values.

Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category term of the Tcllib Trackers. Please also report any ideas for enhancements you may have for either package and/or documentation.


ansi, attribute control, color control, control, terminal


Terminal control