Latest 1.0.5
License MIT
Platforms ios 8.0



Convert hexadecimal string to UIColor with r g b value. 😏
extention of UIColor
It can be used as UIColor as it can be used as.

For example :)

FFAA 02 => UIColor



CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate GMSDirection into your Xcode project using CocoaPods, specify it in your Podfile:

vi ./Podfile

If you do not have the google map SDK for iOS

target 'MyApp' do
  pod 'SHColor'

Then, run the following command:

$ pod setup
$ pod install

Use it

Via SSH: For those who plan on regularly making direct commits, cloning over SSH may provide a better experience (which requires uploading SSH keys to GitHub):

$ git clone [email protected]:keisukeYamagishi/SHColor.git

Via https: For those checking out sources as read-only, HTTPS works best:

$ git clone

Sample code

self.view.backgroundColor = UIColor(hex: "5AC8FA")

Even if the prefix has a #, you can convert it.

self.view.backgroundColor = UIColor(hex: "#5AC8FA")
self.view.backgroundColor = UIColor(hex: "#5ac8fa")

Passing an invalid character string returns 0.

self.view.backgroundColor = UIColor(hex: "#😏😏😏😏😏😏")

Latest podspec

    "name": "SHColor",
    "version": "1.0.5",
    "summary": "Convert hexadecimal to UIColor",
    "description": "Convert hexadecimal to UIColor",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "keisuke": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.0.5"
    "platforms": {
        "ios": "8.0"
    "source_files": [

Pin It on Pinterest

Share This