Color-Table in C

Color-Table in C Programming Language

Following colors are available for use in c graphics programming.




Color Table :


COLORVALUE
BLACK0
BLUE1
GREEN2
CYAN3
RED4
MAGENTA5
BROWN6
LIGHTBLUE7
DARKGRAY8
LIGHTBLUE9
LIGHTGREEN10
LIGHTCYAN11
LIGHTRED12
LIGHTMAGENTA13
YELLOW14
WHITE15

Total number of colors available depend on current graphics driver and mode. Use colors name in capital letters, for example use setcolor(RED) not setcolor(red) the latter will give you an error. You may use number instead of color for example setbkcolor(GREEN) or setbkcolor(2) are same, but you are advised to use color name as it will improve readability of program.
Share on Google Plus

0 comments: