Skip to content

Instantly share code, notes, and snippets.

@mahmudahsan
Created February 27, 2020 04:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mahmudahsan/5d7cfd80cef279a1e0c1a3867d43c42c to your computer and use it in GitHub Desktop.
Save mahmudahsan/5d7cfd80cef279a1e0c1a3867d43c42c to your computer and use it in GitHub Desktop.
struct GradientText: View {
let title: String
let colors = Gradient(colors: [Color.hexStringToColor(hex: "#FF0000"),
Color.hexStringToColor(hex: "#40B482")])
var body: some View {
RadialGradient(gradient: colors,
center: .center,
startRadius: 0,
endRadius: 300)
.frame(height: 65)
.mask(Text("Good Morning")
.font(.system(size: 50))
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment