title: How do I invert a colour?
body: <p>I know that this won't directly invert a colour, it will just 'oppose' it. I was wondering if anyone knew a simple way (a few lines of code) to invert a colour from any given colour?</p>
  
  <p>At the moment I have this (which isn't exactly the definition of an invert, because if I pass it a grey / gray colour it will return something extremely similar e.g. 127, 127, 127):</p>
  
  <pre><code>const int RGBMAX = 255;
  
  Color InvertMeAColour(Color ColourToInvert)
  {
      return Color.FromArgb(RGBMAX - ColourToInvert.R, 
        RGBMAX - ColourToInvert.G, RGBMAX - ColourToInvert.B);
  }
  </code></pre>