The header file graphics.h contains
getmaxcolor() function, which returns maximum color value for current graphics mode and driver. As color numbering starts from zero, total number of colors available for current graphics mode and driver are ( getmaxcolor() + 1 ) .
Syntax :
int getmaxcolor();
Below is the implementation of getmaxcolor() function.
Output :
👁 Image