PC: What is the purpose of Display set fg color and bg color? What is the correct usage?
fg ==> foreground color is used for drawing objects like lines, dots, etc. So functions like display_draw_line() and display_draw_arc() make use of the color set with the display_set_fg_color() function.
bg ==> background color is used to fill in the background when copying for instance icons to the screen buffer. For instance the function display_copy_icon_use_colors() makes use of both these color settings.
The functions to draw the pointers overwrite the foreground color with the background color after drawing the pointer itself, to display the text in the given background color. These functions do not use the background color when drawing the pointer. The pixels that are not on remain on the color that was there before.
Basically the background color is not used that much. The foreground color is used for most of the drawing functions to color the active pixels.
Maybe not the most practical or optimal solution, but that is what you get when developing without first making specifications of what is needed and let things grow and change as you get along.