title: How to get the background color of a label - iOS 4?
body: <p>I thought this would be simple, but....</p>
  
  <p>How can I get the backgroundcolor of a UILabel (preferably in RGB) ?</p>
  
  <p>I can't seem to find a method or a simple way to convert a UIColor to RGB.</p>
  
  <p>Thanks.</p>
  
  <p>EDIT:
  I ended up using this code:</p>
  
  <pre><code>CGFloat r,g,b,a;
  const float* colors=CGColorGetComponents(myLabel.backgroundColor.CGColor);
  r=colors[0];
  g=colors[1];
  b=colors[2];
  a=colors[3];
  </code></pre>