Last active
October 20, 2020 13:59
-
-
Save Bradysm/59911025dcf2f2793ec94f17ebc2e138 to your computer and use it in GitHub Desktop.
ColorManager struct to manage colors within your application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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