Search
 
SCRIPT & CODE EXAMPLE
 

C

C colourful text

#include <stdio.h>

//defining all combinations to be used.
#define RED   "x1B[31m"
#define GRN   "x1B[32m"
#define YEL   "x1B[33m"
#define BLU   "x1B[34m"
#define MAG   "x1B[35m"
#define CYN   "x1B[36m"
#define WHT   "x1B[37m"
#define RESET "x1B[0m"

int main() {
	//Using defines very easily without a need for '%s' of 'x1B[...'
    printf(RED "red
"     RESET);
    printf(GRN "green
"   RESET);
    printf(YEL "yellow
"  RESET);
    printf(BLU "blue
"    RESET);
    printf(MAG "magenta
" RESET);
    printf(CYN "cyan
"    RESET);
    printf(WHT "white
"   RESET);
	
  	return 0;
}
Comment

PREVIOUS NEXT
Code Example
C :: C output color font 
C :: stop redis server 
C :: generate n-bit gray code in c 
C :: sleep in c programming 
C :: terminal size in c 
C :: purge nvidia 
C :: factorial in c 
C :: golang loop through array 
C :: haskell print 
C :: how to map one value to another in C 
C :: C float division 
C :: Using PostgreSQL array to store many-to-many relationship using sqlalchemy 
C :: how to open jupyter notebook in local disk D 
C :: sigaction in c 
C :: #![feature]` may not be used on the // stable release channel 
C :: C how to find substring in string 
C :: find smallest number in array in c 
C :: printf type format 
C :: c static variables 
C :: how to pass an array of structs as an argument in c 
C :: c language time() function 
C :: gcc options to find out makefiel rules 
C :: c int to char 
C :: hello word in c 
C :: identifier bool is undefined in c 
C :: getchar 
C :: linked list using c 
C :: c change value of const 
C :: best approach c menu terminal 
C :: sleep in c 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =