Latest 0.1.0
Homepage https://github.com/ngs/color-hash.swift
License MIT
Platforms ios 8.0, osx 10.9, watchos 2.0, tvos 9.0, requires ARC
Authors

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

Latest podspec

{
    "name": "ColorHash",
    "version": "0.1.0",
    "summary": "Color Generator Based on Swift String",
    "description": "This is a Swift port of [Color Hash](https://github.com/zenozeng/color-hash).nnGenerates UIColor and NSColor from given string.nn```nlet str = "u3053u3093u306bu3061u306fu3001u4e16u754c"nlet saturation = 0.30nlet lightness = 0.70nnColorHash(str, [CGFloat(saturation)], [CGFloat(lightness)]).colorn```",
    "homepage": "https://github.com/ngs/color-hash.swift",
    "license": "MIT",
    "authors": {
        "Atsushi Nagase": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ngs/color-hash.swift.git",
        "tag": "0.1.0"
    },
    "requires_arc": true,
    "platforms": {
        "ios": "8.0",
        "osx": "10.9",
        "watchos": "2.0",
        "tvos": "9.0"
    },
    "source_files": "ColorHash/*.swift"
}

Pin It on Pinterest

Share This