title: How to compare a color in swift
body: <p>I am trying to compare colors but I cannot use the <code>isEqual</code> method because I am trying to compare the color of the background of a <code>UICollectionViewCell</code>.</p>
  
  <p>What is the correct way to compare colors in this situation?</p>
  
  <pre><code>if(cell!.layer.backgroundColor! == UIColor.redColor().CGColor)
  {
      cell?.layer.backgroundColor = UIColor.redColor().CGColor
  }
  </code></pre>