Is there a way to find the complement of a color given its RGB values? Or can it only be found for certain colors? How would someone go about doing this in Java?
Complement
How to Calculate a Complementary Color (PHP): http://www.serennu.com/colour/rgbtohsl.php
Javascript implementation: http://stackoverflow.com/questions/1664140/js-function-to-calculate-complementary-color
Supplement
(couldn't find technical definition)
it should just be math
the total of the r values of the 2 colors should be 255
the total of the g values of the 2 colors should be 255
the total of the b values of the 2 colors should be 255
This is a question that can have unexpected depth, depending on what you need this for. If you're just trying to create something that looks more or less like the complement of an input color, it's pretty trivial using simple math. If you want it to be as close as possible (so you actually get a neutral gray when mixing the color), then you'll need to deal with color spaces, gamma, and the rest of the calibrated color mess.
Incidentally, I'm not familiar with the term "supplement of a color" - what do you mean by that?