I am trying to create a CGColor in Swift 5.3 in macOS Catalina 10.15.7, using:
where r,g,b, are between 0.0 and 1.0, but the returned object is a NSObject. Same result as using
The NSColor is created correctly but at retrieve the CGColor, the result is NSObject.
Some suggestions.
Thanks.
Manuel
Code Block let colour : CGColor = CGColor.init(red: r, green: g, blue: b, alpha: 1.0)
where r,g,b, are between 0.0 and 1.0, but the returned object is a NSObject. Same result as using
Code Block let colour : CGColor = NSColor.init(red: r, green: g, blue: b, alpha: 1.0).cgColor
The NSColor is created correctly but at retrieve the CGColor, the result is NSObject.
Some suggestions.
Thanks.
Manuel