 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can use set color functions available in graphics.h header file to display different background colors manually or automatically. Before starting, you can subscribe my YouTube channel by clicking on the link which is available at the bottom right corner of this video. You can download my app Techimus that is available on Google Play. You can connect with me by following these details which are available in front of you. Now coming on to the topic, first I am going to include a header file that is graphics.h another header file conio.h then main function inside main function first variable is gd then gm and i gd stands for graphics driver gm stands for graphics mode and i will be for loop counter gd is initialized with detect so it will automatically detect the graphics related requirement now to initialize graphics I am using init graph function and passing three parameters first parameter is graphics driver second graphics mode and third one is C, T, C and BGI this is the path for graphics library now I am using a for loop loop is starting from zero and it is repeating till 15 so whenever we want to apply colors colors are already defined in graphics.h so first I am searching colors which are available in graphics.h so you can see color constants are defined as name black, blue, green, cyan, red etc and these colors have an integer values starting from zero to 15 so I will be using these integer values to display background colors so I am passing i inside set bk color so initially it will display zero zero is for black then one two three and till 15 inside for loop I am using get ch then close graph function and then return zero right now this program will work manually I have to press enter key to change the background color because I have used get ch inside the for loop so I am executing it it is showing black color now I am pressing enter key it has a change to blue again I am pressing enter key color has changed so I have to press any particular key from the keyboard if I want to change the background color so you can see colors are changing as I am pressing the keys you will feel it why you will be implementing this code in your system so it has terminated now I have to convert this manual sorry this this manual process into automatic process so I am removing this get ch and I am using delay delay is a predefined function which holds console for some time moment and when that time moment is over then a process will be resumed so I am again executing this code now you can see it is changing automatically I haven't pressed any enter key if you want to increase the time you can increase delay arguments value now this time you can see it is changing slide slowly so this is the automatic process through which you can change the colors of your background screen I hope you have understood how you can use set bk color function to display different background colors both manually and automatically and I have also shown you the list of colors which are available along with their numerical values I hope you have understood all the concepts which I have explained if you want to watch more programming related videos you can subscribe my youtube channel thank you for watching this video