Source Code File 03-06_pink
03-06_pink.c
#include <ncurses.h>
#define PINK 1
int main()
{
initscr();
start_color();
if(!can_change_color())
addstr("This probably won't work...\n");
init_color(PINK,1000,750,750); /* pink */
init_pair(1,PINK,COLOR_BLACK);
attrset(COLOR_PAIR(1));
printw("This is the new color %d.\n",PINK);
refresh();
getch();
endwin();
return 0;
}
Output Screenshot

Notes
* I ran the output on the iTerm program with the terminal configured as xterm-256. Here's the output:

Copyright © 1997-2025 by QPBC.
All rights reserved
