<commit_before>SwiftColors [![Build Status](https://travis-ci.org/thii/SwiftColors.png)](https://travis-ci.org/thii/SwiftColors)
===========

HEX color handling as an extension for UIColor. Written in Swift.

# Examples
``` swift
// With hash
let color: UIColor = UIColor(hexString: "#ff8942")

// Without hash, with alpha
let secondColor: UIColor = UIColor(hexString: "ff8942", alpha: 0.5)

// Short handling
let shortColorWithHex: UIColor = UIColor(hexString: "fff")
```

# Installation
Just drop the SwiftColors.swift file into your project.

# Requirements
iOS 7.0 or above.

# To Do
* [ ] Add support for Mac OS X

# License
[MIT](http://thi.mit-license.org/)<commit_msg>Add examples for initilization a color from a real hex value<commit_after>SwiftColors [![Build Status](https://travis-ci.org/thii/SwiftColors.png)](https://travis-ci.org/thii/SwiftColors)
===========

HEX color handling as an extension for UIColor. Written in Swift.

# Examples
``` swift
// With hash
let color: UIColor = UIColor(hexString: "#ff8942")

// Without hash, with alpha
let secondColor: UIColor = UIColor(hexString: "ff8942", alpha: 0.5)

// Short handling
let shortColorWithHex: UIColor = UIColor(hexString: "fff")
```

For those who don't want to type the double quotation, you can init a color from a real hex value (an `Int`)

```swift
// With hash  
let color: UIColor = UIColor(hex: 0xff8942)

// Without hash, with alpha
let secondColor: UIColor = UIColor(hex: 0xff8942, alpha: 0.5)
```


# Installation
Just drop the SwiftColors.swift file into your project.

# Requirements
iOS 7.0 or above.

# To Do
* [ ] Add support for Mac OS X

# License
[MIT](http://thi.mit-license.org/)
{'fraction_non_alphanumeric': 0.13859020310633213, 'fraction_numerical': 0.021505376344086023, 'mean_word_length': 4.403225806451613, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2415766', 'n_tokens_mistral': 591, 'n_tokens_neox': 566, 'n_words': 180}