Created
July 11, 2016 08:29
-
-
Save Nathaniel100/84da93a77b267bb6f8b800b79a6550f2 to your computer and use it in GitHub Desktop.
Color text in terminal applications in UNIX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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" | |
printf("This is " RED "red" RESET " and this is " BLU "blue" RESET "\n"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment