I am working on a Swift 4 macOS Application that involves a vibrant dark window and an in-window NSVisualEffectView. Currently, the NSVisualEffectView's color does not quite match that of the window, but it is very close.
How can I make the NSVisualEffectView's color perfectly match the window? My goal is to have the blur effect it provides only appear when content is beneath it, and making it's color match that of the window would create this effect. I have included an image of what is currently happening. You may need to zoom into the image and turn up your display brightness to see the difference. Though it appears minor in this screenshot, the NSVisualEffectView spans the entire window, and on the Retina display of a Mac, the difference is apparent.
I have tried setting the NSVisualEffectView's background color to clear, but that has not worked.
visualEffectView.wantsLayer = true
visualEffectView.layer?.backgroundColor = NSColor.clear.cgColor
I would appreciate any advice on this!