title: Why do RGBTRIPLE and RGBQUAD store data in BGR order?
body: <p>In Windows, the RGBTRIPLE and RGBQUAD structs are defined in reverse order. It is so counterintuitive that I imagine it must have been done deliberately. It doesn't really matter, of course, but this has bugged me enough that I feel it's worth asking. So, why?</p>
  
  <p>The definitions:</p>
  
  <pre><code>typedef struct tagRGBTRIPLE {
          BYTE    rgbtBlue;
          BYTE    rgbtGreen;
          BYTE    rgbtRed;
  } RGBTRIPLE, *PRGBTRIPLE, NEAR *NPRGBTRIPLE, FAR *LPRGBTRIPLE;
  
  typedef struct tagRGBQUAD {
          BYTE    rgbBlue;
          BYTE    rgbGreen;
          BYTE    rgbRed;
          BYTE    rgbReserved;
  } RGBQUAD;
  </code></pre>