A color extension for Swift with Photoshop blending.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Images Fix README preview and pink color Feb 5, 2017
Sweetercolor.xcodeproj Update for Swift 4 May 10, 2018
Sweetercolor Update for Swift 4 May 10, 2018
SweetercolorTests Change hex init to string based Jan 18, 2017
.gitignore Views from the Sweeterside Aug 18, 2015
.swift-version Add swift-version file May 10, 2018
LICENSE
README.md Add installation guide to README May 10, 2018
Sweetercolor.podspec Fix podspec source May 10, 2018

README.md

Sweetercolor

Sweetercolor

A color extension library for Swift.*

*It has Photoshop style color blending!

Example

// Example of hex initializer
let sun = UIColor(hex: "#FBF002")
// Example of RGB 0-255 initializer
let pink = UIColor(r: 241, g: 139, b: 185)

let container = UIView(frame: CGRect(x: 0, y: 0, width: 888, height: 250))
container.backgroundColor = pink

let label = UILabel(frame: container.frame)
label.text = "Sweet"
label.textColor = sun

// Example of overlay similar to Photoshop with reduced alpha
// This allows us to get a more natural ambient shadow
label.layer.shadowColor = pink.overlayBlack.with(alpha: 0.6).cgColor

Example Preview

Installation

You can either directly copy Sweetercolor.swift into your project or you can use CocoaPods: Sweetercolor.

Documentation

Each method is documented using headerdocs. An overview can be found here: jathu.me/sweetercolor

License

The license is provided in the project folder.

Logo

The logo and name is based off of Sweeterman by Ramriddlz. The original logo is based on the Chiquita logo.


August 2015 - Toronto