Skip to content

Instantly share code, notes, and snippets.

Created April 6, 2021 17:20
What would you like to do?
Random Color for SwiftUI
extension Color {
/// Return a random color
static var random: Color {
return Color(
red: .random(in: 0...1),
green: .random(in: 0...1),
blue: .random(in: 0...1)
Copy link

steipete commented Apr 6, 2021

MIT or Public Domain licensed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment