CC1 widget colours

When setting the foreground and background colours (fg_colour, bg_colour) for widgets, you can define the colour in one of 2 ways:

  • use a named colour (select from ‘black’,‘white’, ‘lightgrey’, ‘darkgrey’ or ‘greyX’ where X is 1 to 14) eg:
    "fg_colour":"lightgrey", "bg_colour":"darkgrey"
  • use a RGB value array : 3 values between 0 and 255 eg:
    "fg_colour":[200,200,200], "bg_colour":[20,20,20]

Note that fg_colour is used for the text and any outline/underlines etc, and the bg_colour is used to fill the entire region of the widget before rendering.

You can also set the bg_colour to “trans” to request transparent, in which case the region is not filled and any previously drawn widget pixels will show thru. Logically this should also apply to the background text colour, but this does not work right now (a contrasting colour to fg_colour is used).

Finally, note that the visual difference between the grey values may not be very marked, and that grey regions take longer to write to the epaper display…