FabGL
ESP32 Display Controller and Graphics Library

◆ setForegroundColor()

void setForegroundColor ( Color  color,
bool  setAsDefault = true 
)

Sets 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);
Examples
SSD1306_OLED/128x64/NetworkTerminal/NetworkTerminal.ino, VGA/Altair8800/Altair8800.ino, VGA/LoopbackTerminal/LoopbackTerminal.ino, and VGA/NetworkTerminal/NetworkTerminal.ino.

Definition at line 940 of file terminal.cpp.