GBC color 3D LUT file format

Back to main page

In BGB 1.6 and newer, the GBC colors can be customized arbitrarily by loading a 3D LUT file.

The format is the same as used by Game Boy Interface (GBI), the alternative Gameboy Player software. The format is as follows:

The LUT is a PNG image file, with a width of 1024 pixels and a height of 32 pixels. BGB can also load the LUT as a BMP (windows bitmap) file, in case GDI+ is not present, but PNG is recommended for compatibility with GBI.

The GBC can display 32 shades for red, green, and blue, so it can show a total of 32x32x32 or 32768 colors.
The image is a 32x32x32 color cube, or 32 32x32 color squares side by side, each pixel corresponds to one GBC color.
to convert from R,G,B (values range from 0 to 31), to X,Y (the coordinate in the image):

X = 32 * B + R
Y = G
Each GBC color becomes the color of the pixel in its corresponding position.

As an example, this is the "identity" LUT, which converts each pixel color to itself:

External link: the Gameboy Interface color LUT documentation