I found another way to accomplish this in newer versions of macOS (e.g. Mojave and Catalina) that doesn't require turning on "Reduce Transparency" and therefore losing all of the other transparency effects in macOS.
The idea is to make a customized background image that fills your display and has white pixels underneath the exact area that the menu bar occupies.
To do this, following these steps:
- In your image editor of choice (such as Photoshop, Affinity Photo, or GIMP), create a new document whose resolution matches the resolution of your display.
- Copy and paste in the image that you want to be your background, and arrange it in the document in whatever manner you choose (e.g. filling the entire document, centering it, etc.). Or, if you want a solid color background, simply fill the image with the color you want.
- Create a white rectangle at the very top of the document that stretches across the entire document horizontally. Make sure its top edge lines up exactly with the top edge of the document.
- If your display is not a retina display, make the rectangle's height be 22 pixels. If your display is a retina display, determine the rectangle's height in pixels using the following formula:
[vertical resolution of your display] * 22 / [apparent height of display in pixels (as indicated in the Displays pref pane)]
- Save the document as a png file, and make it your desktop background.
For example, if you have a 5k iMac and your main display is scaled to look like 2560x1440, your image's size would be 5120x2880 (the resolution of the display), and the white rectangle would be 44 pixels tall (or 2880 * 22 / 1440).
Here's an example image that would work for a 1080p display.
Note: this method has one important limitation, which is that if you change the resolution of your monitor, the image will no longer properly line up with the menu bar. So this method is only appropriate if you never plan to change your resolution.