The header file graphics.h contains
getbkcolor() function which returns the current background color.
Syntax :
int getbkcolor();
As getbkcolor() returns an integer value corresponding to the background color, so below is the table for Color values.
Colors Table :
COLOR INT VALUES
-------------------------------
BLACK 0
BLUE 1
GREEN 2
CYAN 3
RED 4
MAGENTA 5
BROWN 6
LIGHTGRAY 7
DARKGRAY 8
LIGHTBLUE 9
LIGHTGREEN 10
LIGHTCYAN 11
LIGHTRED 12
LIGHTMAGENTA 13
YELLOW 14
WHITE 15
When the background color is black:
Output :
👁 Image
When the background color is other than black: