Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daktales/UIColorWDUtils
An iOS Swift UIColor extension
https://github.com/daktales/UIColorWDUtils
Last synced: about 1 month ago
JSON representation
An iOS Swift UIColor extension
- Host: GitHub
- URL: https://github.com/daktales/UIColorWDUtils
- Owner: daktales
- License: mit
- Created: 2014-09-29T08:53:18.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-17T08:28:10.000Z (about 10 years ago)
- Last Synced: 2024-08-01T19:31:25.250Z (4 months ago)
- Language: Swift
- Size: 129 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-swift-cn - UIColorWDUtils - Extension for Hex RGB(A). (Libs / Colors)
README
UIColorWDUtils (Swift)
===
This is a simple extension for RGB(A) hex values and UIColor class. Support for RGB and RGBA as numeric values##Examples
// Class extension
let emerald = UIColor(rgb:0x2ECC71)
let darkEmerald = UIColor(rgba: emerald.toRGBA()!, blackAmount: 0.1)
let lightEmerald = UIColor(rgba: emerald.toRGBA()!, whiteAmount: 0.1)
let peterRiver = UIColor(red8Bit: 52, green8Bit: 152, blue8Bit: 219, alpha: 1.0)
// Utilities
let (redComponent, _, _, _) = WDDecomposeRGBA(emerald.toRGBA()!)
let myColorHexValue = WDCompose8bitRGBA(UInt(redComponent * 255) , 100, 200, 1.0)##License
This code is distributed under the terms and conditions of the [MIT license](LICENSE).