When I initialize a CGColor and convert it to UIColor it does not render in the same way as a UIColor that is initialized with the same values. How can I convert between CGColor and UIColor and keep the same appearance?
This code produces two slightly different colors (see screenshot) although I would expect the colors to be the same:
self.view.backgroundColor = UIColor(red: 19/255.0, green: 25/255.0, blue: 28/255.0, alpha: 1.0)
let myCGColor = CGColor(red: 19/255.0, green: 25/255.0, blue: 28/255.0, alpha: 1.0)
self.secondView.backgroundColor = UIColor(cgColor: myCGColor)
