Colour code in C language
1 minute read
Colour code in C language
• Black \033[0;30m
• Red \033[0;31m
• Green \033[0;32m
• Yellow \033[0;33m
• Blue \033[0;34m
• Purple \033[0;35m
• Cyan \033[0;36m
• White \033[0;37m
Now we will write simple c program named hello.c to print hello world on screen in red colour
Now we will run this program and our desired output is here :)There is another way to do same , in this way we will not use printf function two times to display colourful text on screen Output of this code is same as above :)Here output has little difference from prior output , it's reason is that we used \033[0;00m at the end of the line which makes text colour normal after "hello world in red" that's why we get 'program finished' in white colour.Thankyou :)