shadow(withLevel:)
Creates a new color object that represents a blend between the current color and the shadow color.
Declaration
func shadow(withLevel val: CGFloat) -> NSColor?Parameters
- val:
The amount of the shadow color used for the blend. This should be a number from
0.0through1.0. AshadowLevelbelow0.0is interpreted as0.0; ashadowLevelabove1.0is interpreted as1.0.
Return Value
The new NSColor object. Returns nil if the colors can’t be converted.
Discussion
The shadow color is provided by the shadowColor property. Call this method when you want to darken the current color for use in shadows.