Instance Method


Returns the color of the rendered gradient at the specified relative location.


- (NSColor *)interpolatedColorAtLocation:(CGFloat)location;



The location value for the color you want. This value must be between 0.0 and 1.0. This value need not correspond to the location of one of the color objects used to create the gradient.


This method does not simply return the color values used to initialize the receiver. Instead, it computes the value that would be drawn at the specified location.

The start color of the gradient is always located at 0.0 and the end color is always at 1.0.

See Also

Getting Gradient Properties


The color space of the colors associated with the gradient.


The number of color stops associated with the gradient.

- getColor:location:atIndex:

Returns information about the color stop at the specified index in the receiver’s color array.