The number of colors in the palette dictates the number of bits per pixel of raster data required to specify an index number. For example, to specify 256 colors you need to send 8 bits of raster data per pixel (28 = 256).
In direct selection, colors are specified using the proportions of their primary components. For example, using a
Pixel Encoding
Colors are encoded in a row of raster data using either plane or pixel format. In planar format, all the pixels in a row are partially specified by one plane (bit) before the next plane is sent. In pixel format, each pixel is fully specified before sending the next pixel.
Encoding by Plane
Planar encoding uses successive data planes, each providing one bit for each pixel in a row. Each plane builds upon the preceding planes until the pixels in a row are fully defined. A pixel is not fully defined until it has received all the planes for that row.
The planes in a row form index numbers that define a pixel by selecting a palette entry. For example, an
3 planes (23 = 8). The underlined bits below compose the index of the color of the third pixel in the first row.
?*b#V | row 1 | plane 1 | (red) | b1 | b1 | b1 | b1 | b1 | b1 . . . |
?*b#V |
| plane 2 | (grn) | b2 | b2 | b2 | b2 | b2 | b2 . . . |
?*b#W |
| plane 3 | (blue) | b3 | b3 | b3 | b3 | b3 | b3 . . . |
?*b#V | row 2 | plane 1 | (red) | b1 | b1 | b1 b1 b1 b1 . . . |
EN |