Traditionally, when calculating an HSV color's complement, a "quick and dirty" solution is to simply take the color's hue value and go half way around the color wheel. In most cases this strategy leads to a fairly close approximation of the color's true complement, but for shades of red, and some shades of blue, the approximation is noticeably different from the actual complement.
For instance, in the color wheel shown here, the selected red value would yield a complement of cyan - since cyan is the color directly across from red in the color wheel - instead of green, red's true complement. I'm assuming this dispersion has to do with the limitations of representing colors digitally, so I suppose I'd be looking for a way to convert an HSV/RGB color into a format that lends itself to finding complements.