Set foreground color

Description

  Set foreground color of 256 color format, the color format is(Binary):RRRGGGBB, or 262K color format(Binary):00RRRRRR,00GGGGGG,00BBBBBB

Usage:

Direct:

"SCc"
"ESCRGB"

Arduino:

void setColor(uint8_t c)
void setTrueColor(uint8_t Ruint8_t Guint8_t B)

C:

void Digole_setColor(uint8_t c)

void Digole_setTrueColor(uint8_t R, uint8_t G, uint8_t B)

Parameters:

c

The byte of RRRGGGBB format

RGB

3 bytes 262K color format, the maximum value of each byte must less than 64

Return:

none

Example (Arduino):

mydisp.setColor(255); //set the foreground to white, 256 color format

mydisp.setTrueColor(0,0x10,0); //set foreground color to light green, 262K color format

Example(direct)

serial.writeString("SC\xFF"); //set the foreground to white 256 color format

serial.writeString("ESC\x00\x10\x00"); //set foreground color to light green, 262K color format

Changelog

Version Description
   

See Also

The 256 color code 

Set background color