HI,
If I recall correctly in mode 13h, and assuming the default palette and color register values, the first 16 colors (0-15) by design match the colors for the 16-color modes.
Yes, you are correct. Wikipedia has a picture of the default palette
on their Mode 13H page. If you use only the other 240 palette
entries, your program may be more compatible with an OS or the
BIOS when displaying text or the like.
if i remember correctly, the DAC values are 6-bits only
so, 0 is for no luminance in that color, and 3Fh is full luminance
i don't remember the order for colors, but guessing R, G, B
Right, you remember correctly, the VGA color registers are 6-bits
each. And they are in RGB order. An image using a 256 color
palette normally stores 8-bit values. So you divide by four (usually
by shifting to the right) to convert those palette entries when using
Mode 13H. Targa TGA images muddle things a bit by using a BGR
ordering.
Regards,
Steve N.