Edit: As of 2018-04-10 there is a built-in setting to hide your currently played game in Profile > Edit Profile > My Privacy Settings > Game details. Set this to Private, but take note of the other profile items affected by this setting. Since it would hide so much of your profile, this old answer may still be useful:
You can maintain a "blue" online status while playing a Steam game.
This method requires multiple instances of Steam. For example, sign into the same Steam account on 2 different machines. Set your status to Offline in the instance you'll play your game from, and set the other instance's status to whatever you want your friends to see.