# SetBGColor(r:Red, g:Green, b:Blue {,a:Alpha}) hash function
Valid for use with hash command: HMI Arguments may be specified as Name:Value Pairs
Implemented on the following platforms: HMi430, Android, Windows (except Alpha)
Sets the background colour for future display hash functions to the colour specified by Red, Green and Blue components using the RGB colour model. Legal values for each are 0 to 255. The 4th parameter, Alpha, is optional. It controls the transparency. Alpha = 0 gives total transparency, Alpha = 255 makes it totally opaque. Alpha is not implemented in the Windows SimpleHMI client.
Common colours are:
| (255, 255, 255) | White |
| (255, 0, 0) | Red |
| (0, 255 ,0) | Green |
| (0, 0, 255) | Blue |
| (0, 0, 0) | Black |
| (128, 128, 128) | Medium grey |
Examples:
# HMI SetFGColour(255, 0, 0) SetBGColour(0, 0, 0) Print(" Hello World ")
will display the message in red letters on a black background.
# HMI SetFGColour(255, 0, 0) SetBGColour(0, 0, 0, 0) Print(" Hello World ")
will display the message in red letters on a transparent background.
You may also use the keywords SetBGColour, BGColourRGB, BGColorRGB
See also SetFGColor, SetColors