title: What is a good way to store color?
body: <p>I started to make "game of life" and I thought, what if I could have more states than 1 or 0.</p>
  
  <p>But then I need different colors. I want the colors to be linked to a grid/object (the grid is a class). </p>
  
  <p>What is a good/decent way to store color pallets for fast/easy access?</p>
  
  <p>My current less than ideal solution was to have 4 pointers to memory for each red, green, blue and alpha value.</p>
  
  <p>In my class I had a function to set the color of value <code>v</code> to rgba:</p>
  
  <pre><code>SetColor(v, r, g, b, a) //Set v to the appropriate color values
  </code></pre>
  
  <p>I would like to keep this function to easily modify a color.</p>