An open API service indexing awesome lists of open source software.

https://github.com/yageek/grade-swift

:fireworks: Generate gradient from the 2 main dominant colours in an image. Port of grade.js
https://github.com/yageek/grade-swift

coregraphics gradient ios

Last synced: over 1 year ago
JSON representation

:fireworks: Generate gradient from the 2 main dominant colours in an image. Port of grade.js

Awesome Lists containing this project

README

          

# Grade Swift

Generate gradient from the 2 main dominant colours in an image. This a port of [grade](https://github.com/benhowdle89/grade) in Swift for iOS.

![Screenshot](screenshot.png)

## Setup

As cocoapods/carthage support is not available yet, simply include the `Source/Grade.swift` file in your project.

## Usage

```swift
// iOS
let image = UIImage(named: "myimage")!
let (start, end) = GradeColors(forImage: image)
```

An sample project is available inside the `Sample-iOS` directory.