I'm generating all ncurses color pairs like this
but according on several sources, some terminals suport more colors.Code:void generate_all_color_pairs(){ int foreground; int background; int i = 0; for(foreground=0; foreground<8; foreground++){ for(background=0; background<8; background++){ i++; init_pair(i, foreground, background); } } }
Is there any way to determine how many colors the current terminal supports?



LinkBack URL
About LinkBacks


