Because that's not the goal.
Perhaps the answer is "you can't do that", or "there are an infinite number of ways to do that" (which is fine).
I started this off knowing, and admitting that it was a highly abstruse thing.
By complementary color I'm assuming either the inverse color, or a point diametrically opposed on the color wheel.
Neither of these things are the task I was contemplating.
If you have a color palette of M colors, you may only use N for any given digital image.
Subtract these colors actually used from the complete range of colors able to be represented by the RGB range in the palette.
This leaves you with M-N colors to work with.
The inverse of a color palette entry might exist as part of the N colors used to display another part of the image.
So that's out.
The opposing point - the complementary color - on the color wheel might also be one of the N colors.
So that's out.
So, with the remaining M-N colors - the complementary SET of colors of the whole RGB cube, how might one expand / extrapolate / interpolate those colors to now fill all of the color palette entries used to display the image.
If Nature abhors a vacuum, imagine the "real" colors being sucked out of the RGB cube with a straw - the colors in the vicinity would expand to occupy that "space" - the color palette entries of the image.
Here's the origin of this "I wonder...."
http://news.povray.org/povray.binaries. ... ay.org%3E/I thought, perhaps in the contemplation of this - with no practical purpose in mind - some interesting theories and experiments might be conducted, and ---- it's just for fun.
There's plenty of things that didn't make much sense before someone pushed in that direction.
Instantaneous velocity. time elapsed = 0, distance traveled in 0 time = 0, velocity = 0/0 .... undefined. Until limits and calculus.
What's the square root of -1? "it doesn't exist" "we just represent it as i as a placeholder." But now imaginary numbers are used all the time for real world applications.
The Fourier transform.
Quaternions.
Octonions.
Higher dimensions. The Calabi-Yau manifold.
So I'm just looking in this weird direction, and asking, "What's in THAT direction? Right there - where the colors AREN'T?"