pair_content, PAIR_NUMBER - get information on a colour pair
#include <curses.h> int pair_content(short pair, short *f, short *b); int PAIR_NUMBER(int value);
Refer to can_change_color().