Changing the Text Color
Fri, Feb 3, 2012
One-minute read
A plain console doesn’t have to stay black and white. Here we change the color of the text shown in the console.
The way it works is that each color has a code, so let me lay them out:
-A B
– 1234567890
You then combine two of these codes (background and text) into something like a8, for example…
Code:
#include
#include
using namespace std;
int main(){
system ("color b8");
cout
– Turkish Version –
Yazının rengini değiştirmek
Sade bir konsolun siyah beyaz kalması şart değil. Burada konsolda çıkan yazıların rengini değiştiriyoruz.
Mantığı şu: her rengin bir kodu var, onları sıralayayım:
-A B
– 1234567890
Sonra bu kodlardan ikisini (arkaplan ve yazı) a8 gibi birleştirerek şöyle yazıyorsunuz…
Kod:
#include
#include
using namespace std;
int main(){
system ("color b8");
cout