A SwiftUI package that provides the Google AI Studio brand gradient system as drop-in components and view modifiers. All colors and sequencing follow the official brand guidelines.
| Color | Hex | RGB | Proportion |
|---|---|---|---|
| Blue | #3186FF |
49, 134, 255 |
52% |
| Red | #FF4641 |
255, 70, 65 |
16% |
| Yellow | #FFCC00 |
255, 204, 0 |
16% |
| Green | #0EBC5F |
14, 188, 95 |
16% |
Sequencing: Blue → Red → Yellow → Green → Blue (never reorder)
Add to your Package.swift:
dependencies: [
.package(path: "../Packages/AIStudioGradients")
]Or in Xcode: File → Add Package Dependencies → Add Local → select the AIStudioGradients folder.
import AIStudioGradientsZStack {
YourContent()
BrandGradientRimView()
}
// Or as a modifier:
YourContent()
.brandGradientRim(cornerRadius: 48)// Vibrant (for active states like recording/building)
BrandMeshGradientView()
// Dark (for home screen backgrounds)
BrandMeshGradientView(style: .dark, speed: 0.008)
// Or as a modifier:
YourView()
.brandMeshBackground(style: .dark)Text("Google AI Studio")
.font(.largeTitle.bold())
.brandGradientForeground()
Image(systemName: "sparkles")
.font(.system(size: 48))
.brandGradientForeground()RoundedRectangle(cornerRadius: 20)
.brandGradientBorder(cornerRadius: 20, lineWidth: 2)
Circle()
.brandGradientStroke(lineWidth: 3)Circle()
.brandGradientFill()
RoundedRectangle(cornerRadius: 16)
.brandGradientFill(startPoint: .top, endPoint: .bottom)BrandColors.blue // #3186FF
BrandColors.red // #FF4641
BrandColors.yellow // #FFCC00
BrandColors.green // #0EBC5F
BrandColors.darkGrey // #202124
// Pre-built gradients
BrandColors.angularGradient()
BrandColors.linearGradient()
BrandColors.meshColors // [Color] for MeshGradient
BrandColors.darkMeshColors // [Color] dark variant- iOS 18.0+ / macOS 15.0+ / visionOS 2.0+
- Swift 6.0+
- Xcode 16.0+
| Component | Description |
|---|---|
BrandColors |
All brand color constants and gradient factories |
BrandGradientRimView |
Glowing multi-layer rim overlay |
BrandMeshGradientView |
Animated 3×3 mesh gradient (vibrant & dark) |
.brandGradientRim() |
View modifier for rim overlay |
.brandMeshBackground() |
View modifier for mesh background |
.brandGradientForeground() |
Gradient text/icon fill |
.brandGradientStroke() |
Gradient border on views |
.brandGradientBorder() |
Gradient border with custom corner radius |
.brandGradientFill() |
Gradient fill on shapes |