- etc. Now to actually start using colors, you have to define
- pairs. Colors are always used in pairs. That means you have
- to use the function <tt class="LITERAL">init_pair()</tt> to
- define the foreground and background for the pair number
- you give. After that that pair number can be used as a
- normal attribute with <tt class=
- "LITERAL">COLOR_PAIR()</tt>function. This may seem to be
- cumbersome at first. But this elegant solution allows us to
- manage color pairs very easily. To appreciate it, you have
- to look into the the source code of "dialog", a utility for
- displaying dialog boxes from shell scripts. The developers
- have defined foreground and background combinations for all
- the colors they might need and initialized at the
- beginning. This makes it very easy to set attributes just
- by accessing a pair which we already have defined as a
- constant.</p>
+ , etc. Now to actually start using colors, you have to
+ define pairs. Colors are always used in pairs. That means
+ you have to use the function <tt class=
+ "LITERAL">init_pair()</tt> to define the foreground and
+ background for the pair number you give. After that that
+ pair number can be used as a normal attribute with
+ <tt class="LITERAL">COLOR_PAIR()</tt>function. This may
+ seem to be cumbersome at first. But this elegant solution
+ allows us to manage color pairs very easily. To appreciate
+ it, you have to look into the the source code of "dialog",
+ a utility for displaying dialog boxes from shell scripts.
+ The developers have defined foreground and background
+ combinations for all the colors they might need and
+ initialized at the beginning. This makes it very easy to
+ set attributes just by accessing a pair which we already
+ have defined as a constant.</p>