bennyguitar / Colours

A beautiful set of predefined colors and a set of color methods to make your iOS/OSX development life easier.
MIT License
3.09k stars 300 forks source link

RGBA <-> HSBA color conversion issue #39

Closed winstonyang closed 9 years ago

winstonyang commented 9 years ago

Hello,

I was trying to debug the darken/lighten functions while it used to work properly, it does not seem to any more. I've looked into this some more and found if you try to convert colors between 2 color spaces, they are not equivalent. For instance, try this:

NSArray hsbColorArray = [[UIColor blueColor] hsbaArray]; ===> Yields a blue color UIColor color = [UIColor colorFromHSBAArray:hsbColorArray]; ===> Yields a red color

Thanks.

winstonyang commented 9 years ago

Apologies. Issue was due to another podfile overriding colorWithHue function. This works properly.

bennyguitar commented 9 years ago

No worries man, I was about to test this out, but I could have sworn my unit tests would have caught this. Thanks for using this library.

winstonyang commented 9 years ago

I'm the one who should thank you for this great library and it is very well written. Appreciate it!