Here's a fun little thing I wrote in response to a similar question on the C++ boards, modified for C of course
Code:
#include <stdio.h>
#include <windows.h>
#define HOT FOREGROUND_INTENSITY
#define RED FOREGROUND_RED
#define GREEN FOREGROUND_GREEN
#define BLUE FOREGROUND_BLUE
int main ( void )
{
HANDLE h;
h = GetStdHandle ( STD_OUTPUT_HANDLE );
SetConsoleTextAttribute ( h, RED | GREEN );
printf ( "My " );
SetConsoleTextAttribute ( h, RED );
printf ( "next " );
SetConsoleTextAttribute ( h, GREEN );
printf ( "rant " );
SetConsoleTextAttribute ( h, HOT | BLUE );
printf ( "will " );
SetConsoleTextAttribute ( h, HOT | RED );
printf ( "be " );
SetConsoleTextAttribute ( h, HOT | GREEN );
printf ( "in a " );
SetConsoleTextAttribute ( h, HOT | BLUE | RED );
printf ( "technicolor " );
SetConsoleTextAttribute ( h, BLUE | GREEN );
printf ( "rainbow :D\n" );
SetConsoleTextAttribute ( h, GREEN | BLUE | RED );
return 0;
}
-Prelude