highlight(withLevel:)
Creates a new color object that represents a blend between the current color and the highlight color.
Declaration
func highlight(withLevel val: CGFloat) -> NSColor?Parameters
- val:
The amount of the highlight color that is blended with the receiver’s color. This should be a number from
0.0through1.0. AhighlightLevelbelow0.0is interpreted as0.0; ahighlightLevelabove1.0is interpreted as1.0.
Return Value
The new NSColor object. Returns nil if the colors can’t be converted.
Discussion
The highlight color is provided by the highlightColor property. Call this method when you want to brighten the current color for use in highlights.