Changing colours in 3d views

Here's a real newbie one for ya.

I was just watching John Patton's instructional video on Sprites, and he seems to have a way set up to really quickly change the background colour in his perspective view from black to white (or some grey or other -- the video quality's not that great) and back again.

The only way I know of to do it is to go through the settings/preferences menu. A quick toggle might be handy when a guy's working on particles, or doing playblasts.

Is my tiny brain missing something obvious?

do a toggle that changes the prefs and then back... Nothing spectacular or wierd wery normal maya thing. For starter set maya to echo all in script editor and try to figure the command out