Skip to content

Instantly share code, notes, and snippets.

@Bradysm
Last active October 20, 2020 13:59
Show Gist options
  • Save Bradysm/59911025dcf2f2793ec94f17ebc2e138 to your computer and use it in GitHub Desktop.
Save Bradysm/59911025dcf2f2793ec94f17ebc2e138 to your computer and use it in GitHub Desktop.
ColorManager struct to manage colors within your application
// ColorManager.swift created by Brady Murphy
import SwiftUI
struct ColorManager {
// create static variables for custom colors
static let spotifyGreen = Color("SpotifyGreen")
//... add the rest of your colors here
}
// Or you can use an extension
// this will allow you to just type .spotifyGreen and you wont have to use ColorManager.spotifyGreen
extension Color {
static let spotifyGreen = Color("SpotifyGreen")
// ... add the rest of your colors here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment