title: What makes this code "endian independent"?
body: <p>I came across the following code, and was told that it means that <code>COL_8888_RED</code> is "endian independent". Why? What makes this endian independent?
  (I have asked the original coder but they're not getting back to me ... heck maybe <em>they</em> don't know either.)</p>
  
  <pre><code>union _colours {
      uint8  c[3][4];
      uint32 alignment;
  };
  
  static const union _colours col_8888 = {
          {    /*   B     G     R     A  in memory     */
                  {    0x00, 0x00, 0xFF, 0xFF, }, /* red   */
                  {    0x00, 0xFF, 0x00, 0xFF, }, /* green */
                  {    0xFF, 0x00, 0x00, 0xFF, }, /* blue  */
          }
  };
  
  #define COL_8888_RED   *((uint32 *)&amp;col_8888.c[0])
  </code></pre>