title: Formula For calculating opposite ("Difference") for hexadecimal color
body: <p>How can I create the opposite of a hexadecimal color?  For example, I'd like to convert 0x000000 (black) into 0xFFFFFF (white), or 0xFF0000 (red) into 0x00FFFF (cyan).  Those are rather basic colors, while variants of colors can have more complex hexadecimal values, such as 0x21B813 (greenish).</p>
  
  <p>Are bitwise operators required for this?  Maybe a loop of each digit to calculate it's mirror from 0 to 15, or 0 to F (0 become F, 6 becomes 9, etc.)</p>
  
  <p>I'm using ActionScript, so I'm almost certain that this would be done the same way in Java.</p>