title: Swift error: "class cannot be constructed because it has no accessible initializers"
body: <p>Xcode is giving me this error for my Swift code:</p>
  <blockquote>
  <p>'myColor' cannot be constructed because it has no accessible initializers</p>
  </blockquote>
  <pre><code>import Foundation
  
  protocol Prototype {
      func Clone&lt;T&gt;() -&gt; T
  }
  
  class myColor: Prototype {
      var red: Int?
      var green: Int?
      var blue: Int?
      
      init () {}
      
      func Clone&lt;myColor&gt;() -&gt; myColor {
          let newColor = myColor()
          newColor.red = self.red
          newColor.green = self.green
          newColor.blue = self.blue
          
          return newColor
      }
  }
  </code></pre>
  <p>The error is on line:</p>
  <pre><code>let newColor = myColor()
  </code></pre>
  <blockquote>
  <p>Type 'myColor' has no member 'init'</p>
  </blockquote>