Is there a way to get the complimentry colour of a RGB hex value?

Basically if I had a colour as a hex value (we’ll just use #XXYYZZ with the two letters representing the hex or the decimal values), is there some sort of algorithm (or failing that a more organic method) I could follow to get its complimentry colour?

If you have Adobe Illustrator you can set the fill color to the hex value and then select the Color Guide palette and change the drop down to Complementary.

That will give you the compliment and if you want any other color harmonies based on it.

I use Fireworks, which doesn’t seem to have that tool. In any case, if there’s a way to do it manually (i.e. in my head or with a pen and paper), it would probably be better if I used that, since I sometimes end up using paint.

try this site for a decent tool:

According to this site, you have to first convert RGB values into HSL and then add/subtract 180 degrees from the hue.

Or their calculator can do it for you.