FabGL
ESP32 VGA Controller and Graphics Library

◆ setPenColor() [1/2]

void fabgl::CanvasClass::setPenColor ( uint8_t  red,
uint8_t  green,
uint8_t  blue 
)

Set pen (foreground) color specifying color components.

Parameters
redRed color component. Minimum value is 0, maximum value is 1 with 8 colors and 3 with 64 colors.
greenGreen color component. Minimum value is 0, maximum value is 1 with 8 colors and 3 with 64 colors.
blueBlue color component. Minimum value is 0, maximum value is 1 with 8 colors and 3 with 64 colors.

Example:

// Set white pen with 8 colors setup
Canvas.setPenColor(1, 1, 1);

// Set white pen with 64 colors setup
Canvas.setPenColor(3, 3, 3);