I really like @Prontto's solution but it does not work with NSImageView because it has no drawsBackground or backgroundColor.
Fortunately the appearance option works for image views as well!
cell.imageView?.image = image ?? nil
cell.imageView?.appearance = NSAppearance(named: NSAppearanceNameAqua)