void Graphics::setColor( Color | ColorIndex | uint8_t color [, Color | ColorIndex | uint8_t bgColor ] ) void Graphics::setColor( uint8_t r , uint8_t g , uint8_t b )
Graphics::setColor will set the current drawing color. You can also specify a background color. If none is specified the background color will be transparent. This is used for things like drawing text, setting pixels etc. You can also specify your own RGB values you want to use.
IMPORTANT!!! Colors are static, meaning that if you change the color on gb.light it will also change on gb.display etc.!
WHITE GRAY DARKGRAY BLACK PURPLE PINK RED ORANGE BROWN BEIGE YELLOW LIGHTGREEN GREEN DARKBLUE BLUE LIGHTBLUE
none
#include <Gamebuino-Meta.h>void setup() { gb.begin(); } void loop() { while(!gb.update()); gb.clear(); // set the color to draw gb.display.setColor(RED); gb.display.println("Red text"); }