---
title: "highlightColor(withFrame:in:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nscell/highlightcolor(withframe:in:)"
---

# highlightColor(withFrame:in:)

Returns the color the receiver uses when drawing the selection highlight.

## Declaration

```swift
func highlightColor(withFrame cellFrame: NSRect, in controlView: NSView) -> NSColor?
```

## Parameters

- `cellFrame`: The bounding rectangle of the receiver.
- `controlView`: The control that manages the cell.

## Return Value

Return Value The color the receiver uses when drawing the selection highlight.

## Discussion

Discussion You should not assume that a cell would necessarily want to draw itself with the value returned from selectedControlColor. A cell may wish to draw with different a selection highlight color depending on such things as the key state of its controlView.

## See Also

### Drawing and Highlighting

- [draw(withFrame:in:)](appkit/nscell/draw(withframe:in:).md)
- [drawInterior(withFrame:in:)](appkit/nscell/drawinterior(withframe:in:).md)
- [controlView](appkit/nscell/controlview.md)
- [highlight(_:withFrame:in:)](appkit/nscell/highlight(_:withframe:in:).md)
- [isHighlighted](appkit/nscell/ishighlighted.md)
