I know it's not exactly what the author asked, but if you're using SwiftUI you can check how a View looks in Light or Dark themes directly in the Preview canvas, as shown in the image: