In OS X it used to be that you could turn off the transparency effect on the OS X menu bar via the Desktop and Screen Saver section in System Preferences. That isn’t the case anymore in OS X Yosemite as Apple has removed that option (sort of — I’ll explain below). Here is how to disable the transparency effect for the menu bar in OS X Yosemite.
In System Preferences > Accessibility > Display, enable the “Reduce transparency” option.
Note: This setting disables transparency across the whole system, it doesn’t seem like it’s possible to disable the transparency just for the menu bar anymore.
Once you have enabled the “Reduce transparency” option, your menu bar will look like this (I’m using dark mode in OS X).