[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6956":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":16,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":28,"readmeContent":29,"aiSummary":30,"trendingCount":16,"starSnapshotCount":16,"syncStatus":31,"lastSyncTime":32,"discoverSource":33},6956,"Pastel","cruisediary\u002FPastel","cruisediary","🎨 Gradient animation effect like Instagram","",null,"Swift",3514,185,38,16,0,28.81,"MIT License",false,"master",true,[23,24,25,26,27],"animation","gradient","instagram","pastel","swift","2026-06-12 02:01:32","# Pastel\n🎨 Gradient animation effect like Instagram\n\n![Swift](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSwift-5.9-orange.svg)\n[![Version](https:\u002F\u002Fimg.shields.io\u002Fcocoapods\u002Fv\u002FPastel.svg?style=flat)](http:\u002F\u002Fcocoapods.org\u002Fpods\u002FPastel)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fcocoapods\u002Fl\u002FPastel.svg?style=flat)](http:\u002F\u002Fcocoapods.org\u002Fpods\u002FPastel)\n[![Platform](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fplatform-iOS%2016%2B-blue.svg)](https:\u002F\u002Fdeveloper.apple.com\u002Fios\u002F)\n[![SPM compatible](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSPM-compatible-brightgreen.svg)](https:\u002F\u002Fswift.org\u002Fpackage-manager\u002F)\n\n![pastel_01.gif](README\u002FPastel_01.gif)\n![pastel_02.gif](README\u002FPastel_02.gif)\n![pastel_03.gif](README\u002FPastel_03.gif)\n\n## Requirements\n\n- iOS 16.0+\n- Swift 5.9+\n- Xcode 15+\n\n## Installation\n\n### Swift Package Manager\n\nAdd Pastel to your `Package.swift`:\n\n```swift\ndependencies: [\n    .package(url: \"https:\u002F\u002Fgithub.com\u002Fcruisediary\u002FPastel.git\", from: \"1.0.0\")\n]\n```\n\nOr in Xcode: **File → Add Package Dependencies** and enter the repository URL.\n\n### CocoaPods\n\n```ruby\npod 'Pastel', '~> 1.0.0'\n```\n\n## Usage\n\n### SwiftUI\n\n**Animated gradient background (preset)**\n\n```swift\nimport SwiftUI\nimport Pastel\n\nstruct ContentView: View {\n    var body: some View {\n        Text(\"Hello\")\n            .pastelBackground(.instagram)\n    }\n}\n```\n\n**Animated gradient background (custom colors)**\n\n```swift\nText(\"Hello\")\n    .pastelBackground(colors: [\n        UIColor(red: 156\u002F255, green: 39\u002F255, blue: 176\u002F255, alpha: 1),\n        UIColor(red: 255\u002F255, green: 64\u002F255, blue: 129\u002F255, alpha: 1),\n        UIColor(red: 32\u002F255, green: 76\u002F255, blue: 255\u002F255, alpha: 1)\n    ], duration: 3.0)\n```\n\n**Animated gradient view**\n\n```swift\nPastelGradientView(gradient: .sunset, duration: 4.0)\n    .ignoresSafeArea()\n```\n\n**Animated gradient text**\n\n```swift\nPastelText(\"Pastel\", font: .largeTitle, gradient: .instagram)\n```\n\n**Shared state (coordinate multiple views)**\n\n```swift\nlet state = PastelAnimationState(\n    colors: [.purple, .pink, .blue],\n    duration: 3.0,\n    timingCurve: .easeInOut,\n    repeatBehavior: .count(5),\n    autoreverses: true\n)\n\nPastelGradientView(state: state)\nPastelText(\"Hello\", state: state)\n```\n\n### UIKit\n\n**Basic usage**\n\n```swift\noverride func viewDidLoad() {\n    super.viewDidLoad()\n\n    let pastelView = PastelView(frame: view.bounds)\n\n    \u002F\u002F Direction\n    pastelView.startPastelPoint = .bottomLeft\n    pastelView.endPastelPoint = .topRight\n\n    \u002F\u002F Duration\n    pastelView.animationDuration = 3.0\n\n    \u002F\u002F Colors\n    pastelView.setColors([\n        UIColor(red: 156\u002F255, green: 39\u002F255, blue: 176\u002F255, alpha: 1),\n        UIColor(red: 255\u002F255, green: 64\u002F255, blue: 129\u002F255, alpha: 1),\n        UIColor(red: 123\u002F255, green: 31\u002F255, blue: 162\u002F255, alpha: 1),\n        UIColor(red: 32\u002F255, green: 76\u002F255, blue: 255\u002F255, alpha: 1),\n        UIColor(red: 58\u002F255, green: 255\u002F255, blue: 217\u002F255, alpha: 1)\n    ])\n\n    pastelView.startAnimation()\n    view.insertSubview(pastelView, at: 0)\n}\n```\n\n**Shared state with UIKit**\n\n```swift\nlet state = PastelAnimationState(\n    colors: [.purple, .pink, .blue],\n    duration: 3.0,\n    timingCurve: .easeInOut\n)\n\nlet pastelView = PastelView(frame: view.bounds)\npastelView.animationState = state\npastelView.startAnimation()\nview.insertSubview(pastelView, at: 0)\n```\n\n## 🎨 Gradient Presets\n\n30 built-in presets available via `PastelGradient`.\n\n#### Designed by Alexander Zaytsev — https:\u002F\u002Fdribbble.com\u002Fanwaltzzz\n![Gradient.png](README\u002FGradient.png)\n\n## Example Project\n\nClone the repo and open `Example\u002FPastel.xcodeproj`. No additional setup needed — Pastel is linked via SPM automatically.\n\n## Author\n\ncruz, cruzdiary@gmail.com\n\n## Thanks\n\nMany thanks to [**the contributors**](https:\u002F\u002Fgithub.com\u002Fcruisediary\u002FPastel\u002Fgraphs\u002Fcontributors) of this project.\n\n## License\n\nPastel is available under the MIT license. See the LICENSE file for more info.\n","Pastel 是一个用于实现类似 Instagram 的渐变动画效果的 Swift 库。它支持自定义颜色、动画时长和方向，并且提供了多种预设样式，如 Instagram 风格的渐变。该库兼容 iOS 16 及以上版本，支持通过 Swift Package Manager 和 CocoaPods 方式集成到项目中。无论是 SwiftUI 还是 UIKit 项目，都可以轻松使用 Pastel 来增强界面视觉效果，适用于需要动态背景或文本效果的应用场景，比如社交媒体应用、个性化主题设置等。",2,"2026-06-11 03:09:50","top_language"]