justinmeiners / ios-color-wheel

A fully scalable, dynamically rendered color wheel for iOS.
82 stars 15 forks source link

Calling 'setCurrentColor(:)' with UIColor.black, turns the entire color wheel black #11

Closed cprovatas closed 7 years ago

cprovatas commented 7 years ago

Because black is not a supported color on the color wheel, calling 'setCurrentColor(:)' with UIColor.black, just turns the entire color wheel black. Anyone have any ideas for workaround on black color? My thought was just to add a 'brightness' slider or something and to allow the user to get a pseudo-black color.

justinmeiners commented 7 years ago

@cprovatas Since the color wheel is only two axis, it can only control two values. I have chosen these values to be hue and saturation. If you need brightness as well, you will need an additional slider which is what I did in the example code. I believe you can key-value observe the brightness value in the color wheel to appropriately update the slider.

You also may want to look at some forks of this project. I haven't updated it in years and it looks like some other developers are doing cool stuff with it.

cprovatas commented 7 years ago

Thanks