SwiftyColor 1.0.0

SwiftyColor 1.0.0

DocsDocumented
TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Sep 2016
SPMSupports SPM

Maintained by Suyeol Jeon.


Downloads

Total5,910
Week176
Month627

Installs

Apps117
Apps WeekApps This Week 23
Test Targets27
Test WeekTests This week 7
powered by Segment

GitHub

Stars48
Watchers4
Forks0
Issues0
Contributors1
Pull Requests0

Code

Files1
SizeIntegration Size 12 kb
LOCLines of Code 40


  • By
  • Suyeol Jeon

SwiftyColor

The most sexy way to use colors in Swift. Both compatible with iOS and macOS.

Color from Hex

let color = 0x123456.color

Alpha Operator

Use infix operator ~.

let transparent = 0x123456.color ~ 50%
let red = UIColor.red ~ 10%
let float = UIColor.blue ~ 0.5 // == 50%

Percent Operator

let view = UIView()
view.alpha = 30% // == 0.3

License

SwiftyColor is under MIT license. See LICENSE file for more information.