ColorMapView is a simple iOS View mapped to a color gradient. Great for color picker type dealies.
ColorMapView is available through cocoapods, to install simple add the following line to your PodFile
:
pod "ColorMapView"
Alternatively you can clone the github repo.
Once you've installed the class:
- Include the ColorMapView header
#import <ColorMapView/ColorMapView.h>
- From there you can either create your ColorMapView instance in Interface Builder or in code by using:
ColorMapView *colorMapView = [ [ColorMapView alloc] initWithFrame:(CGRect)frame];
- The view provides an easy way to get the color at a location within the view.
[colorMapView getColorAtLocation:CGPointMake(50, 200) ];