Instantly share code, notes, and snippets.

Embed
What would you like to do?
let redComponent = CGFloat.random(in: 0.0...1.0)
let greenComponent = CGFloat.random(in: 0.0...1.0)
let blueComponent = CGFloat.random(in: 0.0...1.0)
let alphaComponent = CGFloat.random(in: 0.0...1.0)
let randomColor = NSColor(red: redComponent, green: greenComponent, blue: blueComponent, alpha: alphaComponent)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment