[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Hacking built in colors ?
From: |
Patrick |
Subject: |
Hacking built in colors ? |
Date: |
Wed, 16 May 2018 08:16:07 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Icedove/52.7.0 |
Hi Everyone
I am trying a weird experiment this morning.
I was thinking that it might be nice to be able to set COLOR_BLACK to
navy blue or charcoal grey or something like that. I could put an if
statement around the code and if COLORS is not 256, nothing would happen
and the regular black would show.
I can't get this to work. I just modified a little sample here.
COLOR_YELOW does not change with init_color.
Is it possible to do this another way? or is this idea just pure insanity :)
Thanks-Patrick
#include <ncurses.h>
int main(void)
{
initscr();
start_color();
init_color(COLOR_YELLOW, 1,100,1) ;
init_pair(1,COLOR_RED,COLOR_YELLOW);
color_set(1,NULL);
addstr("The color of this window is now\n");
addstr("Red on Yellow.\n");
refresh();
getch();
endwin();
return 0;
}
- Hacking built in colors ?,
Patrick <=