title: Arduino converting between uint32_t and unsigned chars
body: <p>I'm using the rainbowduino and it has some methods that take individual r g b values as unsigned chars, and some that take a 24bit rgb colour code.</p>
  
  <p>I want to convert r g b values into this 24bit colour code of type uint32_t (so that all my code only has to use r g b values.</p>
  
  <p>Any ideas?</p>
  
  <p>I have already tried uint32_t result = r &lt;&lt; 16 + g &lt;&lt; 8 + b;
  r = 100 g =200 b=0 gave green, but r=0 g=200 b=0 gave nothing</p>
  
  <pre><code>Rb.setPixelXY(unsigned char x, unsigned char y, unsigned char colorR, unsigned char colorG, unsigned char colorB)
  This sets the pixel(x,y)by specifying each channel(color) with 8bit number.
  
  Rb.setPixelXY(unsigned char x, unsigned char y, unit32_t colorRGB) 
  This sets the pixel(x,y)by specifying a 24bit RGB color code.
  </code></pre>