Display formats
So what is a display format? Basically, a display format tells you how each pixel on the screen is represented. The very first display formats were monochrome, meaning each pixel could be either blank or one color (usually white, depending on the monitor), and each pixel could be represented by a single bit. Later, computers got a lot more complex and could use 2-bits (four colors) or 4-bits (16 colors) to store color information, usually preset color values.
The next major revolution was palletized color, in which you had an 8-bit pixel format (265 colors) wherein each color value pointed to a color within a palette. None of this is really important anymore because the world has moved on to (fanfare, please) TRUE COLOR!
True color presented game programmers with the ability to show lush worlds full of vibrant colors. For the first time, we had display formats able to display 16 thousand or 24 million colors all at the same time.
A true color pixel is represented by 16 or 32 bits of data, and is stored in a format that looks like R5G6B5 (16 bits), X8R8G8B8 (32-bits), or something similar. For the first R5G6B5, that means that the pixel stores five bits of red information (32 values), six bits of green information (64 values), and five bits of blue information (32 values). The actual color of the pixel is determined by the color created when those three components are combined. For example, if you had a 16-bit pixel that has (31, 63, 31), you’ll get a white pixel, as all the colors are at their full intensity, and when you combine all of those colors, you get white. Likewise, if you had (0 , 0 , 0), you’d have black, and if you had (31, 31 ,0), you’d have orange (full red, half green, no blue).
32-bit formats tend to be a bit more formalized. There are chiefly two variants: X8R8G8B8 and A8R8G8B8. In the first format, the X means that eight bits are ignored, and not used at all. In the second format, the A stands for alpha, which is an extra eight bits of data that can be stored per pixel and usually represents transparency effects. A pixel with 0 alpha is completely clear, 255 alpha is fully colored, and 127 alpha means that it is blended with 50 percent translucency with the pixel below it.
You´re probably going to want to use a 32-bit color format when working with games. A few years ago, there was a huge performance difference between 19- and 32-bit colors, but today it’s not really a problem anymore. The only time you should really be concerned about using 16-bit colors is when you know you’re going to be using an old graphics card where every bit of speed counts.
And that’s it for my rant on Display formats
![]()