It is derived from the Glowing Cells image, which is already constructed to be fully uniform in the RGB space. The pixels in that image are recursively partitioned here into 8 equally sized groups, depending on whether their colour is closer to pure black, red, green, blue, cyan, magenta, yellow or white. The partitioning acts as a binary search of the unique colour to associate to the pixel, at every iteration reducing the range of each component of the colour by half.