Split the square into 8 vertical sections, one per 3-bit color, with black on the top left, white on the bottom left, and RGB / CMY following them respectively, affecting the most-significant bit not affected by a bigger section
Recurse, but with square sub-sections, with black on the top left and white on the top right