Friday, 6 Mar 2026

Bitmap Color Depth Explained: True vs Indexed Color

Understanding Bitmap Fundamentals

Bitmap images (raster graphics) consist of pixel grids with three critical properties:

  • Pixel count: Width × height in pixels
  • Resolution: Pixel density measured in DPI (dots per inch) - higher DPI means sharper images
  • Color depth: Bits per pixel determining color range

After analyzing this video, I believe many overlook how these elements interact. Higher resolution with insufficient color depth causes visible banding, as shown in the 8-bit sky example.

How Color Depth Impacts Image Quality

Each additional bit doubles color possibilities:

  • 8-bit depth: 256 colors (visible banding in gradients)
  • 24-bit RGB: 16.7 million colors (true color)

RGB works by mixing red, green, and blue channels. Screens use tiny RGB subpixels - when magnified, you see individual lights blending to create perceived colors.

Technical Implementation

  • 8 bits per channel (24 bits total)
  • Values 0-255 per channel
  • Hexadecimal codes like #FF5733 represent RGB values

The video demonstrates that 24-bit eliminates banding, but I’ve observed this depends on display calibration - poorly calibrated screens still show artifacts.

Indexed Color: The Smart Compression Technique

Instead of storing each pixel’s color, indexed bitmaps use a palette (color table):

  1. Create optimized palette (adaptive or web-safe)
  2. Map pixels to palette indices
  3. Store palette + index references

Key Advantages

  • File size reduction: 4-bit depth uses 75% less space than 24-bit
  • Web optimization: 216 web-safe colors ensure cross-browser consistency

However, palette limitations cause quality loss:

  • Dithering: Simulates missing colors by alternating available pixels
  • Graininess: Visible at close zoom levels

When to Use True vs Indexed Color

FactorTrue ColorIndexed Color
Best forPhotos, gradientsLogos, flat graphics
Color Depth24-bit (16.7M colors)1-8 bit (2-256 colors)
File SizeLargerSmaller
Compression TypeLossless (PNG)Lossy (GIF)

Photographers should avoid indexed color for skies/skin tones where dithering creates unnatural textures.

Actionable Checklist for Optimal Bitmaps

  1. Calculate memory needs: Width × height × color depth
  2. Prioritize true color for photographic content
  3. Use adaptive palettes when 256 colors suffice
  4. Enable dithering only for complex reductions
  5. Verify web-safe colors for cross-platform logos

Critical insight: While the video mentions 960×640 images at 600KB, I recommend testing export settings - modern formats like WebP can cut this by 70% without quality loss.

Essential Tools

  • Photoshop: Channel viewing and palette optimization
  • ColorMind: Palette generation tool (free)
  • TinyPNG: True color compression without dithering

Conclusion

True color delivers maximum quality with 24-bit RGB depth, while indexed color strategically sacrifices colors for smaller files. Your choice hinges on whether color accuracy (e.g., product photos) or file size (e.g., website icons) matters more.

Which compression challenge do you face most often: banding in gradients or speckling from dithering? Share your scenario below!