title: C++ - how to convert colour values to RGB
body: <p>I have the following colour values - 0xFFFF40, 0xFFFF20, 0xff5099.</p>
  
  <p>I want to convert these C++ codes into RGB values, how would I need to go about doing this?</p>
  
  <p>Thanks</p>
  
  <p>Edit:
  I would basically want to store these values in 3 different unsigned shorts:</p>
  
  <pre><code>unsigned short red;
  unsigned short green;
  unsigned short blue;
  </code></pre>