Contents

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.0 through 1.0. A highlightLevel below 0.0 is interpreted as 0.0; a highlightLevel above 1.0 is interpreted as 1.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.

See Also

Transforming existing color objects