adam-zethraeus / color-hash.swift

Generates UIColor and NSColor from given string.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Color Hash Swift

This is a Swift port of Color Hash.

Generates UIColor and NSColor from given string.

import ColorHash

let str = "こんにちは、世界"
let saturation = CGFloat(0.30)
let lightness = CGFloat(0.70)

ColorHash(str, [saturation], [lightness]).color

Screen

Install

CocoaPods

pod 'ColorHash'

Carthage

github 'ngs/color-hash.swift'

Author

Atsushi NAGASE

License

See LICENSE

About

Generates UIColor and NSColor from given string.

License:MIT License


Languages

Language:Swift 93.4%Language:Ruby 6.6%