Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

AIStudioGradients

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.

Gradient Specification

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)

Installation

Swift Package Manager

Add to your Package.swift:

dependencies: [
    .package(path: "../Packages/AIStudioGradients")
]

Or in Xcode: File → Add Package Dependencies → Add Local → select the AIStudioGradients folder.

Quick Start

import AIStudioGradients

Glowing Rim Shader

ZStack {
    YourContent()
    BrandGradientRimView()
}
// Or as a modifier:
YourContent()
    .brandGradientRim(cornerRadius: 48)

Animated Mesh Background

// 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)

Gradient Text & Icons

Text("Google AI Studio")
    .font(.largeTitle.bold())
    .brandGradientForeground()

Image(systemName: "sparkles")
    .font(.system(size: 48))
    .brandGradientForeground()

Gradient Borders

RoundedRectangle(cornerRadius: 20)
    .brandGradientBorder(cornerRadius: 20, lineWidth: 2)

Circle()
    .brandGradientStroke(lineWidth: 3)

Shape Fills

Circle()
    .brandGradientFill()

RoundedRectangle(cornerRadius: 16)
    .brandGradientFill(startPoint: .top, endPoint: .bottom)

Direct Color Access

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

Requirements

  • iOS 18.0+ / macOS 15.0+ / visionOS 2.0+
  • Swift 6.0+
  • Xcode 16.0+

Components

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

About

Google AI Studio brand gradient system — SwiftUI components & view modifiers

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages