setbkcolor() function is used to set the background color in graphics mode. The default background color is black and default drawing color as we know is white.
- setbkcolor() function takes only one argument it would be either the name of color defined in graphics.h header file or number associated with those colors. If we write setbkcolor(GREEN) it changes the background color in Green.
- For better understanding go through the program:
int gd=DETECT, gm;
The above program will change the background color to green by using setbkcolor() function and also display a circle of 100 cm radius of center(320,240) as given further: