Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. iOS
  3. Pastel

Pastel

MITSwift1.0.0

A SwiftUI and UIKit library for creating Instagram-like animated gradient backgrounds, text, and views in iOS apps.

GitHubGitHub
3.5k stars185 forks0 contributors

What is Pastel?

Pastel is an iOS library that enables developers to easily add animated gradient effects to their apps, mimicking the smooth gradient animations popularized by Instagram. It provides a simple API for applying gradients to backgrounds, text, and views in both SwiftUI and UIKit. The library solves the problem of implementing complex gradient animations with minimal code, enhancing UI visual appeal.

Target Audience

iOS developers building apps with SwiftUI or UIKit who want to add polished, animated gradient effects to improve user interface aesthetics. It's particularly useful for those creating social, media, or design-focused applications.

Value Proposition

Developers choose Pastel for its ease of use, extensive preset gradients, and seamless integration with both SwiftUI and UIKit. Its unique selling point is the shared animation state, allowing synchronized gradients across multiple UI elements with minimal setup.

Overview

🎨 Gradient animation effect like Instagram

Use Cases

Best For

  • Adding Instagram-style gradient backgrounds to login or splash screens
  • Creating animated gradient text effects for headings or labels
  • Enhancing SwiftUI views with smooth gradient animations
  • Implementing coordinated gradient animations across multiple UIKit components
  • Quickly prototyping gradient-heavy UI designs with preset options
  • Building visually rich iOS apps without custom animation code

Not Ideal For

  • Apps targeting iOS versions below 16.0, as Pastel has a minimum deployment target of iOS 16+
  • Projects requiring static, non-animated gradients for performance or minimalist design
  • Developers needing advanced gradient customization like gradient stops or mesh gradients beyond basic color animations
  • Teams that prefer to avoid external dependencies for UI effects that could be built with native Core Animation

Pros & Cons

Pros

Preset Gradient Library

Offers 30 built-in gradients like .instagram and .sunset for instant implementation without custom color selection, as shown in the README with examples like .pastelBackground(.instagram).

Dual Framework Support

Seamlessly integrates with both SwiftUI modifiers and UIKit views, demonstrated by .pastelBackground in SwiftUI and PastelView in UIKit for flexible usage across codebases.

Shared Animation State

Enables synchronized gradients across multiple UI elements using PastelAnimationState, simplifying coordinated effects like matching backgrounds and text with minimal setup.

Minimal Code Setup

Provides a declarative API that adds animated gradients with just a few lines, such as Text("Hello").pastelBackground(.instagram) for quick prototyping and implementation.

Cons

Limited iOS Compatibility

Requires iOS 16.0 or higher, excluding support for apps that need to run on older iOS versions, which is a significant barrier for legacy projects.

Basic Customization Options

Focuses on color and duration animations but lacks advanced features like gradient stop positioning or complex interpolation controls available in native Core Animation or SwiftUI.

Dependency Overhead

Adds an external library dependency for effects that could be implemented natively, potentially increasing project complexity and maintenance for simple gradient needs.

Frequently Asked Questions

Quick Stats

Stars3,514
Forks185
Contributors0
Open Issues16
Last commit2 months ago
CreatedSince 2017

Tags

#mobile-ui#ios#gradient-animation#animation#ui-effects#instagram#animation-library#gradient#swift-package#swiftui#cocoapods#swift#design-tools#uikit

Built With

S
SwiftUI
U
UIKit
S
Swift

Included in

iOS51.7kSwift26.0k
Auto-fetched 20 hours ago

Related Projects

LottieLottie

An iOS library to natively render After Effects vector animations

Stars26,766
Forks3,834
Last commit29 days ago
SpringSpring

A library to simplify iOS animations in Swift.

Stars14,043
Forks1,801
Last commit2 years ago
IBAnimatableIBAnimatable

Design and prototype customized UI, interaction, navigation, transition and animation for App Store ready Apps in Interface Builder with IBAnimatable.

Stars8,650
Forks777
Last commit3 years ago
ViewAnimatorViewAnimator

ViewAnimator brings your UI to life with just one line

Stars7,326
Forks487
Last commit2 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub