In C++ programming, the background of the output screen is black and text color is in white color. We can color both the background and text color in the output screen in the following ways.
#include <windows.h> or #include <stdlib.h>
In the above command to change the background color change the value X of the above syntax to the corresponding color you want and to change the text color change the value Y of the above syntax to the corresponding color you want.
Below is the table for allow color in C++:
|Color id||Color||Color id||Color|
Below is the illustration of Text coloring in C++:
- C++ Program to Print Matrix in Z form
- Print Number series without using any loop
- Program to print ASCII Value of a character
- Program to print reverse character bridge pattern
- C program to print employee details using Structure
- Print the pyramid pattern with given height and minimum number of stars
- C++ program to append content of one text file to another
- Program to print Swastika Pattern
- Program to print Happy Holi
- How to print N times without using loops or recursion ?
- Program to Print the Trapezium Pattern
- Print the given 3 string after modifying and concatenating
- Program to print half diamond Number-Star pattern
- Program to print elements of a Matrix row-wise skipping alternate elements
- Program to print Kite Pattern
- Print Minimum of all Subarrays using set in C++ STL
- Program to print hollow Triangle pattern
- Print numbers with digits 0 and 1 only such that their sum is N
- Program to print the given Z Pattern
- Print numbers in descending order along with their frequencies
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.