How to toggle with grayscale in Yosemite?
I have found an old Apple Discussion about this and the user who answered the question has posted an AppleScript file that will turn on and off grayscale. I have modified the original code so it would work with OS X Yosemite.

Open "Script Editor" and, in a new document, paste the following:

tell application "System Preferences" to activate
delay 1

tell application "System Events"
tell process "System Preferences"
click the menu item "Accessibility" of the menu "View" of menu bar 1
delay 0.5
click the checkbox "Use grayscale" of window "Accessibility"
end tell
end tell
tell application "System Preferences" to quit


Click the hammer to compile it and then save but where it says "File Format" in the save dialog, choose "Application"

Before running this code make sure that "Display" in Accessibility has been selected like the image below. Once that has been done, you can quit System Preferences. 



On the first run of the app, it will crash and OS X will ask if you want to allow the app to control the computer using accessibility features. Allow access, quit the app and relaunch it.

Sometimes this will not work and will crash with an error message. If this happens, just relaunch it and it will work fine. 

EDIT: This may help with making it a keyboard shortcut: Link