Skip to content

Changes the behavior of isEqual on UIColor to better capture useful equality.

License

Notifications You must be signed in to change notification settings

pixio/UIColor-BetterEquality

Repository files navigation

UIColor-BetterEquality

Version License Platform

Usage

Changes the behavior of isEqual on UIColor to better capture useful equality.

Performs a component-wise comparison of colors for equality. This allows for the comparison of colors that are saved to disk (via NSKeyedArchiver for example) and loaded again. The float serialization is imprecise so this bins them with the precision of 1/255 for each channel.

Installation

UIColor-BetterEquality is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "UIColor-BetterEquality"

Author

Daniel Blakemore, [email protected]

License

UIColor-BetterEquality is available under the MIT license. See the LICENSE file for more info.

About

Changes the behavior of isEqual on UIColor to better capture useful equality.

Resources

License

Stars

Watchers

Forks

Packages

No packages published