VGA color palette
The VGA default 16-color palette with exact hex codes. These match CGA and EGA for backward compatibility — the real VGA story is the 18-bit DAC underneath. Click any swatch to copy.
The default 16 colors
By default VGA shows the same 16 RGBI colors as CGA and EGA, brown at index 6 included. Software that wanted more reprogrammed the DAC.
The 18-bit DAC. VGA's real capability is its digital-to-analog converter:
6 bits per channel, so each of red, green, and blue takes a value from 0 to 63. That's 262,144 possible colors — of which 256 can be active at once in mode 13h. To convert a 6-bit DAC value to standard 8-bit, multiply by 255 and divide by 63. Full 256-color palette editing is on the roadmap here.
Frequently asked
- Is the VGA 16-color palette different from EGA?
- No — the default 16 are identical across CGA, EGA, and VGA by design, for backward compatibility.
- What's mode 13h?
- The famous 320×200 256-color VGA mode. Each of the 256 active entries is defined by an 18-bit DAC value, chosen from 262,144 possibilities.
- How do I convert a 6-bit VGA value to RGB?
- Multiply each channel by 255/63. For example a DAC value of 63 becomes 255; a value of 31 becomes about 125.