This is necessary to set a custom color for the selected line, as well as for the selected text color. The output should look something like this

In the above screenshot we do
You can do a lot more customization, but this answer covers the above questions.
1. Start by subclassing NSTableRowView
class CategoryTableRowView: NSTableRowView { override func drawSelection(in dirtyRect: NSRect) { if selectionHighlightStyle != .none { let selectionRect = bounds.insetBy(dx: 2.5, dy: 2.5) NSColor(calibratedRed: 61.0/255.0, green: 159.0/255.0, blue: 219.0/255.0, alpha: 1.0).setStroke() NSColor(calibratedWhite: 1.0, alpha: 1.0).setFill() let selectionPath = NSBezierPath(roundedRect: selectionRect, xRadius: 25, yRadius: 25) selectionPath.fill() selectionPath.stroke() } } }
2. Return the custom CategoryTableRowView () in the NSTableViewDelegate method
func tableView(_ tableView: NSTableView, rowViewForRow row: Int) -> NSTableRowView? { return CategoryTableRowView() }
3. Make sure you have a selectionHighlightStyle for the normal ViewController in your class
override func viewDidLoad() { super.viewDidLoad() self.tableView.selectionHighlightStyle = .regular }
4. To set textColor, subclass NSTableCellView
class CategoryCellView: NSTableCellView { @IBOutlet weak var categoryTextField: NSTextField! override var backgroundStyle: NSView.BackgroundStyle { willSet{ if newValue == .dark { categoryTextField.textColor = NSColor(calibratedRed: 61.0/255.0, green: 159.0/255.0, blue: 219.0/255.0, alpha: 1.0) } else { categoryTextField.textColor = NSColor.black } } } }
override the backgroundStyle property and set the desired color for the text.
Note. In my case, I have a custom cell with categoryTextField output. To set the text color I use: categoryTextField.textColor = NSColor.black
5. Set a custom class inside the storyboard 
Hope this helps. Thank you