I am trying to apply the same gradient as per the screen shot below using CGGradientCreateWithColorComponents.
This is what I’m using at the moment, however it’s not quite right and I’m after a better way of trying to guess these values. I’d also like to know how to actually determine what these values are as this code was grabbed from a tutorial, which didn’t explain much at all in terms of what the components are.
CGColorSpaceRef myColorspace = CGColorSpaceCreateDeviceRGB();
CGFloat components[8] = { 1, 1, 1, 1, 0.866, 0.866, 0.866, 1 };
CGFloat locations[2] = { 0.0, 1.0 };
CGGradientRef myGradient = CGGradientCreateWithColorComponents(myColorspace, components, locations, 2);

I’ve played around with it and got this picture:
with colors:
using this piece of code:
I dont know if it’s close enough.