The classic Amiga could display 4096 different colors - 16 levels for each of the Red, Green, and Blue components. It takes 12 bits to represent such a color, but the Amiga couldn't handle more than 6 bits per pixel.

The standard modes used a table of 32 color registers, each of which could be set to any 12-bit value. Then each pixel would store a 5-bit value indicating its index in the color table. You could therefore display any 32 of the 4096 possible colors at the same time (unless you changed the color table values every few scanlines; such tricks could be used to give nice vertical-gradient backgrounds, etc).

HAM (Hold and Modify) mode was a clever trick that allowd the Amiga to display all 4096 colors on the screen at the same time. HAM defined 16 of the color-table registers as "base" colors, and used 6 bits per pixel. The first 2 bits specified the mode of operation. "00" meant to display one of the base colors, and the remaining 4 bits were the color-table index.

Modes of "10", "11", and "01" meant that this pixel's color would be the same as the color of the previously-drawn pixel, except that either the Red, Green, or Blue component would be changed to the value specified by the remaining 4 bits. So, with a black base color, a white pixel could be drawn as follows:

  00 0101  -  Base register #5 (for example), black: 0x000
  10 1111  -  Hold, Modify red to full intensity: 0xF00
  11 1111  -  Hold, Modify green to full intensity: 0xFF0
  01 1111  -  Hold, Modify blue to full intensity: 0xFFF

These intermediate pixels (red and yellow in this example) gave a characteristic color-fringing effect to HAM pictures, but the severity could be reduced with careful choice of the base-register colors.

There was another Amiga 6-bit mode called Extra Half-Bright, but it was rarely used. It was the same as 32-color mode, except the intensity of the color components would be reduced by half if the 6th bit was set.

Later Amiga models had a 24-bit color palette, and a HAM8 mode that used 64 base registers to display hundreds of thousands of colors.