the -bgc flag is a windows only option. Does not support linux or unix. If you are on windows, your code is just fine, I just tried it on maya 4.5 and 5, and its fine...I get a blue button and a yellow
As for your query...if you check the docs, you will find that -bgc is not queryable. Sorry, but if you need more flexibility with interfaces, your best bet is to do something via a plugin that ports maya data to an external interface.