clutchlog::fmt::fg_256 Struct Reference
Internal colors management in 256 and 16M colors modes.

Foreground in 256-colors mode. More...

`#include <clutchlog.h>`

Inheritance diagram for clutchlog::fmt::fg_256:
[legend]
Collaboration diagram for clutchlog::fmt::fg_256:
[legend]

## Detailed Description

Foreground in 256-colors mode.

Definition at line 539 of file clutchlog.h.

## Public Member Functions

| fg_256 ()
| Empty constructor: no color.
| fg_256 (const short f)
| Constructor. More...
| fg_256 (const fg &)
| Conversion constructor from 16-colors mode. More...
Public Member Functions inherited from clutchlog::fmt::color_256
| color_256 (ground t)
| Constructor. More...
| color_256 (ground t, const short i)
| Constructor. More...
bool | is_set () const
| Returns true if the underying representation encodes an existing color.
std::ostream & | print_on (std::ostream &os) const
| Print the color index on the given stream.
Public Member Functions inherited from clutchlog::fmt::color
| color (ansi a, ground g)
| Constructor. More...

## Additional Inherited Members

Public Attributes inherited from clutchlog::fmt::color_256
short | index
| The encoded color index in 4-bits ANSI. More...
Public Attributes inherited from clutchlog::fmt::color
ansi | mode
enum clutchlog::fmt::color::ground | type
| Type of color (foreground or background).
Public Types inherited from clutchlog::fmt::color
enum | ground { fore = 38, back = 48 }
| Codes for representing foreground or background.

## Constructor & Destructor Documentation

## fg_256() [1/2]

clutchlog::fmt::fg_256::fg_256 | ( | const short | f | ) |

inline

Constructor.

Parameters

  f | Foreground color index (within [-1,255], -1 being "no color").

Definition at line 546 of file clutchlog.h.

## fg_256() [2/2]

clutchlog::fmt::fg_256::fg_256 | ( | const fg & |  | ) |

inline

Conversion constructor from 16-colors mode.

Warning
  Only encodes "no color", whatever is passed.

Definition at line 551 of file clutchlog.h.

The documentation for this struct was generated from the following file:

- clutchlog.h