Next: , Previous: Keyboards and Keys, Up: Components of a Curses Interface   [Contents][Index]

2.3 Characters, Attributes, Colors, and Renditions

As the goal of curses is to allow a program to take advantage of the capabilities of terminal, each character on the screen has a color pair and a set of attributes.

In curses, the colors are usually defined in terms of color pairs, which is a combination of a foreground and a background color. Each character written to a terminal will have an associated color pair, assuming the terminal supports color.

Also each character has a set of attributes, such as bold, underline, or blink.

A character’s color pair and its attributes are collectively called its rendition.