I am using 2 variations of the same color, a light and dark version, to create a gradient.
Code:
CAGradientLayer *gradient = [CAGradientLayer layer];
UIColor *light = [baseColor lightVersion];
UIColor *dark = [baseColor darkVersion];
gradient.colors = [NSArray arrayWithObjects:(id)[light CGColor], (id)[dark CGColor], nil];
The problem is, I noticed that the CGColor
version of the original UIColor
version is different. Why is that? What is the difference between the UIColor
and CGColor
and why are they different?