Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define CLEAR "\033[00;00;00m"
- static void p_colour(int c1, int c2)
- {
- char col[10];
- sprintf(col, "\033[%d;%dm", c1, c2);
- printf("\"\\033[%d;%dm\" = %scolour%s\n", c1, c2, col, CLEAR);
- fflush(stdout);
- }
- static void test(void)
- {
- #define COL_BLINK "\033[00;05m"
- #define COL_RED "\033[01;29;41m"
- printf("%s%s_%s\n", COL_BLINK, COL_RED, CLEAR);
- fflush(stdout);
- }
- int main(int argc, char *argv[])
- {
- int i, j;
- for (i = 0; i < 9; i++) {
- for (j = 0; j < 80; j++)
- p_colour(i, j);
- }
- test();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement