FabGL
ESP32 VGA Controller and Graphics Library

◆ setForegroundColor()

void fabgl::TerminalClass::setForegroundColor ( Color  color,
bool  setAsDefault = true 
)

Set the foreground color.

Sets the foreground color sending an SGR ANSI code and optionally the default foreground color (used resetting the terminal).

Parameters
colorCurrent or default foreground color.
setAsDefaultIf true the specified color is also used as default.

Example:

   Terminal.setForegroundColor(Color::White);