Indexed Images, like GIFS, have a way of representing colors strictly as 0s and 1s. How does this work you may ask? Well each pixel inside the image is assigned a binary number based on the color index that it has in its said palette.
- 1-bit depth allows for 2 colors.
- 2-bit depth allows for 4 colors.
- 4-bit depth allows for 16 colors.
- 8-bit depth allows for 256 color
With 1-bit depth each pixel is represented by either 0 or a 1, meaning there is only 2 colors, whilst 2 bit depth means they can be represented by 00, 01, 10, 11, allowing for 4 colors. This gets multiplied consecutively each time meaning that bit depth is determined by 2^(bit-depth). Using this depth determines the range of color for the said image, as well as makes it quality for use on the web.
To understand this though, you must understand what a pixel is. A pixel is the smallest element of a digital image. Each pixel has a specific characteristic whether it be something such as the color or the shade of the color. When combining millions of pixels together, this is how we visualize a digital image on the screens that we may view them on. Each pixel separately is represented using binary values when using an indexed image.
We learned that using an indexed image has plenty top gain such as efficiency when loading said image, consistent color representation across the digital devices, as well as ease of saving where these files sizes are magnificently shorter than others as the pixels are condensed, making it easier to share. The only loss we may have using a indexed image could be the “natural” look to it as the small details may not be as clear or concise. So In summary, while indexed images can be useful for certain applications where color precision is not critical, there are trade-offs in terms of color accuracy, detail retention, editing flexibility, file size, and compatibility that should be considered.
Image to the left made using GIMP, indexed as only two colors.