This page describes the BGR233 (also called RGB233) image format. It's a rather unusual and specialized format, with exactly two things going for it:
Actually, the BGR233 format could be thought of as just a way to specify a known, named, palette for a regular 256-color indexed color mode. That is not how it's typically used though, but of course it could be implemented that way on indexed hardware.
The format's name comes from the way the bits are allocated to represent color. Of the eight bits used for each pixel, the red and green components use three bits each, with the remaining two bits used for blue.
The table above illustrates this allocation of bits, showing how each of the eight bits is holding a bit in one of the three color components. The order of the bits gives the BGR233 name, but of course it's more or less arbitrary and could just as well be RGB332.
The reason the blue component is the one that is given one less bit is that the human eye is considered less sensitive to hues of blue.
The way the bits are allocated means that BGR233 is capable of expressing seven distinct hues of pure red or pure green, but only three of pure blue. These are shown below, with the value of each component shown in binary:
The above table can help in understanding why the total number of colors possible is 256. To select a color, you first need to select one of the four possible values for blue, then one of the eight possible values for green, and finally one of the eight possible values for red. The total number of combinations is then 4×8×8 = 256.
Since the ranges of each of the three color components (red, green and blue) are different in BGR233, it's quite hard to form an even-looking grayscale gradient. These are the three pure grays that are available:
Here is one way of visualizing all the 256 colors that the BGR233 format can express. You can mouse over the cells to update the details in the box on the right.
The text in each cell is the corresponding pixel's value in hexadecimal form. Each eight-bit value is represented as two hexadecimal digits. The bit-ordering, as elsewhere on the page, is BGR233.
For display purposes, each color has been converted to a full RGB888 color by repeating the most significant bits of each component as many times as possible. This turns the general BGR233 color b1b0g2g1g0r2r1r0 into the rather unwieldy r2r1r0r2r1r0r2r1g2g1g0g2g1g0g2g1b1b0b1b0b1b0b1b0.