title: What is a mask value?
body: <p>I'm learning the SDL library and one of the functions to create a surface is SDL_CreateRGBSurface. The four parameters I'm wondering about are R, G, B, and A masks. What exactly is a mask in this context? </p>
  
  <p>I'm also following a book about SDL and the author passed in 5 bits of red, 5 bits of blue, and 6 bits of green for the mask values. What does that mean though? What do the mask values do?</p>
  
  <p>I filled in a rectangle onto the screen using a random number (Uint32 color) and got green. When I changed the mask values I noticed that the color changed even with the same color value.</p>