<commit_before>SwiftyColor
===========

[![Build Status](https://travis-ci.org/devxoul/SwiftyColor.svg)](https://travis-ci.org/devxoul/SwiftyColor)
[![CocoaPods](http://img.shields.io/cocoapods/v/SwiftyColor.svg?style=flat)](http://cocoapods.org/?q=name%3ASwiftyColor%20author%3Adevxoul)

The most sexy way to use colors in Swift. Both compatible with iOS and OS X.

Hex Operator
------------

Use postfix operator `~`.

```swift
let color = 0xabcdef~
```

Alpha Operator
--------------

Use infix operator `~`.

```swift
let transparent = 0x123456 ~ 50%
let red = UIColor.redColor() ~ 10%
let float = UIColor.blueColor() ~ 0.5 // 50%
```

Percent Operator
----------------

```swift
let view = UIView()
view.alpha = 30% // 0.3
```


License
-------

SwiftyColor is under MIT license. See LICENSE file for more information.<commit_msg>Update README for short color name alias.<commit_after>SwiftyColor
===========

[![Build Status](https://travis-ci.org/devxoul/SwiftyColor.svg)](https://travis-ci.org/devxoul/SwiftyColor)
[![CocoaPods](http://img.shields.io/cocoapods/v/SwiftyColor.svg?style=flat)](http://cocoapods.org/?q=name%3ASwiftyColor%20author%3Adevxoul)

The most sexy way to use colors in Swift. Both compatible with iOS and OS X.

Hex Operator
------------

Use postfix operator `~`.

```swift
let color = 0xabcdef~
```

Alpha Operator
--------------

Use infix operator `~`.

```swift
let transparent = 0x123456 ~ 50%
let red = UIColor.redColor() ~ 10%
let float = UIColor.blueColor() ~ 0.5 // 50%
```

Percent Operator
----------------

```swift
let view = UIView()
view.alpha = 30% // 0.3
```


Short Color Name Alias
----------------------

With SwiftyColor, you can use short alias for default color names.

| Color Name | Short | Even(?) Shorter |
|---|---|---|
| `UIColor.blackColor` | `UIColor.black` | `Color.black` |
| `UIColor.darkGrayColor` | `UIColor.darkGray` | `Color.darkGray` |
| `UIColor.lightGrayColor` | `UIColor.lightGray` | `Color.lightGray` |
| `UIColor.whiteColor` | `UIColor.white` | `Color.white` |
| `UIColor.grayColor` | `UIColor.gray` | `Color.gray` |
| `UIColor.redColor` | `UIColor.red` | `Color.red` |
| `UIColor.greenColor` | `UIColor.green` | `Color.green` |
| `UIColor.blueColor` | `UIColor.blue` | `Color.blue` |
| `UIColor.cyanColor` | `UIColor.cyan` | `Color.cyan` |
| `UIColor.yellowColor` | `UIColor.yellow` | `Color.yellow` |
| `UIColor.magentaColor` | `UIColor.magenta` | `Color.magenta` |
| `UIColor.orangeColor` | `UIColor.orange` | `Color.orange` |
| `UIColor.purpleColor` | `UIColor.purple` | `Color.purple` |
| `UIColor.brownColor` | `UIColor.brown` | `Color.brown` |
| `UIColor.clearColor` | `UIColor.clear` | `Color.clear` |


License
-------

SwiftyColor is under MIT license. See LICENSE file for more information.
{'fraction_non_alphanumeric': 0.2132564841498559, 'fraction_numerical': 0.01729106628242075, 'mean_word_length': 3.6129568106312293, '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': '1127023', 'n_tokens_mistral': 1083, 'n_tokens_neox': 1001, 'n_words': 208}