As long as the gamma is the same, you can take each 8-bit part of the 32-bit color code, and handle it as unsigned in the range 0 to 255. Multiply it by 257 (not 256) (or add it to itself shifted left by 8 bit positions). This gives you values in the range 0 to 65535 in intervals of 257. That should look the same complete with 8-bit like contouring. The alpha channel MAY need different processing. Then reconstruct it as the 64-bit color code. How you do this depends on your programming language.