I want every character to be a different color.
for example,
cout << "Hello world" << endl;
I know this can be done, I just don't know the code for it.
and I want to change the background color to white. How would I do that?
How to Add Background Color in HTML. To add background color in HTML, use the CSS background-color property. Set it to the color name or code you want and place it inside a style attribute. Then add this style attribute to an HTML element, like a table, heading, div, or span tag.
To set the background color in HTML, use the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML <body> tag, with the CSS property background-color. HTML5 do not support the <body> tag bgcolor attribute, so the CSS style is used to add background color.
Open your device's Settings app . Text and display. Select Color correction. Turn on Use color correction.
There is no (standard) cross-platform way to do this. On windows, try using conio.h
.
It has the:
textcolor(); // and
textbackground();
functions.
For example:
textcolor(RED);
cprintf("H");
textcolor(BLUE);
cprintf("e");
// and so on.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With