I have a function that paints a particular area with the NSColor that is passed to it. To give it a sort of 3D look I need to paint it with a gradient of the given color. Suppose NSColor is blueColor then the area should be painted with something like lightBlue to blueColor or something as such so that I can get a slight gradient effect.
So my question is how can I create NSColor which is lighter than the NSColor that is passed to the function.
Look at the NSColor Class Reference "Changing the Color" section. There are several methods to make a new color form existing one:
Also you can create a new color with RGB components calculated from your existing color (or HSB components) with