Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cruisediary/pastel
🎨 Gradient animation effect like Instagram
https://github.com/cruisediary/pastel
animation gradient instagram pastel swift
Last synced: 3 days ago
JSON representation
🎨 Gradient animation effect like Instagram
- Host: GitHub
- URL: https://github.com/cruisediary/pastel
- Owner: cruisediary
- License: mit
- Created: 2017-05-05T05:45:54.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-10-30T11:40:59.000Z (about 2 years ago)
- Last Synced: 2024-12-19T17:07:06.993Z (3 days ago)
- Topics: animation, gradient, instagram, pastel, swift
- Language: Swift
- Homepage:
- Size: 16 MB
- Stars: 3,501
- Watchers: 40
- Forks: 185
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pastel
🎨 Gradient animation effect like Instagram[![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)
![Swift](https://img.shields.io/badge/Swift-5.0-orange.svg)
[![CI Status](http://img.shields.io/travis/cruisediary/Pastel.svg?style=flat)](https://travis-ci.org/cruisediary/Pastel)
[![Version](https://img.shields.io/cocoapods/v/Pastel.svg?style=flat)](http://cocoapods.org/pods/Pastel)
[![License](https://img.shields.io/cocoapods/l/Pastel.svg?style=flat)](http://cocoapods.org/pods/Pastel)
[![Platform](https://img.shields.io/cocoapods/p/Pastel.svg?style=flat)](http://cocoapods.org/pods/Pastel)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)![pastel_01.gif](README/Pastel_01.gif)
![pastel_02.gif](README/Pastel_02.gif)
![pastel_03.gif](README/Pastel_03.gif)## Example
```swift
override func viewDidLoad() {
super.viewDidLoad()let pastelView = PastelView(frame: view.bounds)
// Custom Direction
pastelView.startPastelPoint = .bottomLeft
pastelView.endPastelPoint = .topRight// Custom Duration
pastelView.animationDuration = 3.0// Custom Color
pastelView.setColors([UIColor(red: 156/255, green: 39/255, blue: 176/255, alpha: 1.0),
UIColor(red: 255/255, green: 64/255, blue: 129/255, alpha: 1.0),
UIColor(red: 123/255, green: 31/255, blue: 162/255, alpha: 1.0),
UIColor(red: 32/255, green: 76/255, blue: 255/255, alpha: 1.0),
UIColor(red: 32/255, green: 158/255, blue: 255/255, alpha: 1.0),
UIColor(red: 90/255, green: 120/255, blue: 127/255, alpha: 1.0),
UIColor(red: 58/255, green: 255/255, blue: 217/255, alpha: 1.0)])pastelView.startAnimation()
view.insertSubview(pastelView, at: 0)
}
```## 🎨 Customize Gradient Colors
#### Designed by Alexander Zaytsev, https://dribbble.com/anwaltzzz
![Gradient.png](README/Gradient.png)To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Requirements
Pastel is written in Swift 3+. iOS 8.0+ Required## Installation
Pastel is available through [CocoaPods](http://cocoapods.org) or [Carthage](https://github.com/Carthage/Carthage).
### Cocoapods
```ruby
pod "Pastel"
```### Carthage
```
github "cruisediary/Pastel" ~> 0.6.0
```## Example
- [Passcode](https://github.com/cruisediary/Passcode): A simple Passcode application using RxSwift, ReactorKit, IGListKit with Pastel## Awesome
* [awesome-swift](https://github.com/matteocrippa/awesome-swift) - A collaborative list of awesome Swift libraries and resources. Feel free to contribute!
* [awesome-gradient](https://github.com/cruisediary/awesome-gradient) - 🌈 A curated list of awesome Gradient frameworks, libraries and software and resources## Author
cruz, [email protected]
## Thanks
Many thanks to [**the contributors**](https://github.com/cruisediary/Pastel/graphs/contributors) of this project.
## License
Pastel is available under the MIT license. See the LICENSE file for more info.