There are quite a few different color models. Most involve at least 3 parameters:
HSB,
RGB
CMYK,
LAB,
and various others.
Go to http://www.cocoacontrols.com and search on "Color picker". You will find quite a few. Most involve specifying 3 different settings: With RGB, it's typical to use 3 sliders. With HSB, you tend to use a color wheel (hue = angle around the circle, distance from the center = saturation) plus a slider for brightness.
HSB (Hue, Saturation and Brightness) is one of the easiest to understand.
If you want to let the user pick colors based on a single slider setting, you'll need to define a sequence of colors somehow. Your color bar looks like it's varying hue and keeping the saturation and brightness values at max. Just fix saturation and brightness and let the user pick a hue. UIColor includes methods that let you enter hue, satiation and brightness values, and also has a method that lets you query a given RGB color and get back HSB values.