title: Table Cell background and text color cannot be set accurately.
body: <p>I need to set the background of table cells to a specific color. 
  (#222222 or RGB(32,32,32) respectively) </p>
  
  <p>The background of the table view in IB is set properly. The correct gray appears in the back of the table header and in section headers etc. 
  But I struggle with the cells. </p>
  
  <p>To customize the cell's apperance I subclass UITableCell and implement the layoutSubviews method. </p>
  
  <p>This works fine:</p>
  
  <pre><code>- (void)layoutSubviews {
  
      [super layoutSubviews];
  
      self.selectionStyle                 = UITableViewCellSelectionStyleGray;
  
      self.backgroundColor                = [UIColor darkGrayColor];
      self.contentView.backgroundColor    = [UIColor darkGrayColor];
      self.textLabel.textColor            = [UIColor whiteColor];
      self.detailTextLabel.textColor      = [UIColor grayColor];
  }
  </code></pre>
  
  <p>However, grayColor and darkGrayColor simply do not match the colour that I need. </p>
  
  <p>Naturally I tried the colorWithRed:green:blue:alpha method of UIColor.</p>
  
  <pre><code>- (void)layoutSubviews {
  
      [super layoutSubviews];
  
      self.selectionStyle                 = UITableViewCellSelectionStyleGray;
  
      self.backgroundColor                = [UIColor colorWithRed:(32/256) green:(32/256) blue:(32/256) alpha:1];
      self.contentView.backgroundColor    = [UIColor colorWithRed:(32/256) green:(32/256) blue:(32/256) alpha:1];
      self.textLabel.textColor            = [UIColor whiteColor];
      self.detailTextLabel.textColor      = [UIColor colorWithRed:(32/256) green:(32/256) blue:(32/256) alpha:1];
  }
  </code></pre>
  
  <p>That one results in black background and black color of the detailTextLable. 
  (Of course it is senseless using the same color for a background and for a text label. I am just trying to work out what colorWithRed:green:blue:alpha does and does not.)</p>
  
  <p>With plain style tables I am fine. Those' cells do not have a background color at all. When I just omit setting the backgroundColor and the contentView's background Color propierties then the background of the cells is displayed as defined as the Table's background color in IB. 
  But with grouped tables the standard background is some light gray which I want to change to some more decent color that matches my client's style guide. </p>
  
  <p>What am I doing wrong? Do I use colorWithRed:green:blue:alpha properly? </p>
  
  <p>Any suggestion is much appreciated. </p>