I need to generate a color map which I am not sure exist. I have a 1024x1024 image which would contain 2^20 pixels. I have 3 color channels which each have 8 bits which would leave us with 2^24 possible colors. This problem is easy to solve with non continuous functions where you simply use 4 bits of the final channel on both of the first two channels to create two 12 bit channels. Unfortunately, I have a new constraint where all three channels of the map must remain continuos as neighboring values may be interpolated together. As this is being used as a lookup table, the interpolation of non continuous values would result in inaccuracies. To put it in a slightly different way, I need a function f and g f(x, y) = r, g, b f^-1(r, g, b) = x, y with r, g, b, being 8 bit numbers (the integers 0 - 255) and x and y being 10 bit numbers (the integers 0 - 1023). All neighboring r,g,b values must be continuous. Do such functions exist, and if so, what are they?