In my application I use function textbackground() from conio library. I have 16 available colors:
#define BLACK 0
#define BLUE 1
#define GREEN 2
#define CYAN 3
#define RED 4
#define MAGENTA 5
#define BROWN 6
#define LIGHTGRAY 7
#define DARKGRAY 8
#define LIGHTBLUE 9
#define LIGHTGREEN 10
#define LIGHTCYAN 11
#define LIGHTRED 12
#define LIGHTMAGENTA 13
#define YELLOW 14
#define WHITE 15
How can I convert these colors to hex code and to RGB, or simply where can i find RGB/hex code for these colors (I have an int 2D array where cells have values from 0 to 15 and these values represent pixels colors. Now I need to save it in BMP and XPM2 format).