Bit Encoded Colors.
How do i allow my console to accept true colors?
And How do the byte encoded colors work like
And what elements does each bit control?
char Color = 0xF F A 5 F F
| | | | | |
1 2 3 4 5 6 Bits?
Would be glad if someone helped me out im scouring the internet but i havent found an answer.
What im asking is how do i access more than the 16 standard colors.
This isn't a standard feature and is not supported by all terminals.
The Windows terminal supports 16 colors and that's the end of that.
However many other terminals support more colors. Xterm, for one, has a 256 color extension. And so do most of the *nix terminals - Konsole, gnome-terminal, etc.
(And as long as you're compiling terminals with extensions, you may as well compile ncurses with the 256-color extension too.)
EDIT: Just so you know, you're probably better off sticking with 16 colors since the 256 color thing is an extension and is disabled even in some versions of xterm.
And for byte-encoded colors, the most common meaning is 1 byte (2 hexadecimal digits) for each color RGB: 0xRRGGBB.
So 0x00FF00 is green (255 for each g, 0 for r and b), 0xFFFFFF is white, and 0xFFA5FF is a really light purple. But most of the time when you have to define colors there ought to be a color-mapping routine, because 2-bits-to-a-color is not always the case.