How to convert an Integer to Red, Green, and Blue values
<p>I'm converting an RGB value to a single integer with the following:</p>

<pre><code>public static int RGBtoInt(int red, int greed, int blue)
{
    return blue + green + (green * 255) + (red * 65536);
}
</code></pre>

<p>but struggling to write an inverse method taking in an integer and returning the single RGB components.</p>

<p>Something of thematic nature with:</p>

<pre><code>public static Vector3 IntToRgb(int value)
{
    // calculations...
    return new Vector3(red, green, blue); 
}
</code></pre>

<p>The <code>Color.FromArgb(int)</code> method isn't creating the RGB colour I need. </p>

<p>The <code>RGBtoInt</code> function above matches the RGB integer values returned by OpenGL and I am looking for a reverse method. It's the same conversion method used <a href="https://www.shodor.org/stella2java/rgbint.html" rel="nofollow">here</a>.</p>