color_content - identify red, green and blue intensity of a colour
#include <curses.h> int color_content(short color, short *red, short *green, short *blue);
Refer to can_change_color().