Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/eugenehp/uicolorhexcolor

Easily create UIColor objects from hex codes.
https://github.com/eugenehp/uicolorhexcolor

Last synced: 3 days ago
JSON representation

Easily create UIColor objects from hex codes.

Awesome Lists containing this project

README

        

UIColorHexColor
===============

Easily create UIColor objects from hex codes.

## Usage

Simply import `UIColor+HexColor.h` in your implementation file and just use the `colorFromHex` method.

```objc
#import "UIColor+HexColor.h"

// ...

UIColor *darkRedColor = [UIColor colorFromHex:0x990000];
```

You can also import the category from inside your `.pch` file so you can use `colorFromHex:` from any file in your binary.

```objc
#ifdef __OBJC__
#import
#import
#import "UIColor+HexColor.h"
#endif
```

## License

`UIColorHexColor` is distributed with the MIT License.