#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "misc/util/abc_global.h"
Go to the source code of this file.
DECLARATIONS ///.
CFile****************************************************************
FileName [utilColor.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Handling counter-examples.]
Synopsis [Handling counter-examples.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - Feburary 13, 2011.]
Revision [
- Id:
- utilColor.c,v 1.00 2011/02/11 00:00:00 alanmi Exp
]FUNCTION DEFINITIONS /// Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 52 of file utilColor.c.
56 HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
57 printf(
"Background 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15\n" );
58 for ( y = 0; y < 16; y++ )
60 printf(
"Foreground %02d", y );
61 for ( x = 0; x < 16; x++ )
64 SetConsoleTextAttribute( hConsole, (WORD)(16 * x + y) );
66 SetConsoleTextAttribute( hConsole, 7 );
93 printf(
"Background " );
94 for ( x = 0; x < 8; x++ )
95 printf(
" [1;4%dm", x );
97 for ( y = 0; y < 2; y++ )
99 printf(
"Foreground [%dm ", y );
100 for ( x = 0; x < 8; x++ )
101 printf(
" \033[%d;3%dm\033[%dm Hi \033[0m", y&1, y>>1, x );
104 for ( y = 0; y < 16; y++ )
106 printf(
"Foreground [%d;3%dm", y&1, y>>1 );
107 for ( x = 0; x < 8; x++ )
108 printf(
" \033[%d;3%dm\033[1;4%dm Hi \033[0m", y&1, y>>1, x );
111 printf(
"\033[4mUnderlined\033[0m\n" );
112 printf(
"\033[5mBlinking \033[0m\n" );
113 printf(
"\033[7mInverted \033[0m\n" );
114 printf(
"\033[8mConcealed \033[0m\n" );