title: RGB color system as a data type
body: <blockquote>
    <p>An RGB color system can represent 256 different colors by combining different shades of red, green and blue. Each shade can be represented as a number. Define a C type to represent the RGB state.</p>
  </blockquote>
  
  <p>From my understanding this would be a proper C type, not sure if I am correct though:</p>
  
  <pre><code>struct{
      int R[256];
      int G[256];
      int B[256];
  } color;
  </code></pre>
  
  <p>Would that be correct or is there a more proper / more efficient way of doing this?</p>