rol. E.g.,

```swift
control.backgroundColor = NSColor.black
```
</code></pre>

<ol>
<li><p>For custom text rendering:</p>

<p>First draw a background fill, then enable font smoothing and render your text. E.g.,</p>
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">context</span> <span class="o">=</span> <span class="kt">NSGraphicsContext</span><span class="o">.</span><span class="nf">current</span><span class="p">()?</span><span class="o">.</span><span class="n">cgContext</span