One of the new features that was added to SQL Server Management Studio (SSMS) in SQL Server 2008, which was continued in SQL Server 2008 R2, is the ability to set custom connection colors for individual instances of SQL Server. The color you set shows up in the bottom of the query window in SSMS. This allows you to do things like set red for Production instances and green for development instances.
In order to get this to work reliably, you need to set it in two different places in SSMS. First, the Connect button in the toolbar. You have to switch to the Connection Properties tab, and set the “Use custom color” for that instance. Next, you need to go to that same instance under Registered Servers, and then set the same color on the Connection Properties tab.
This will make SQL Server use that custom color whether you you are opening a new connection or changing an existing connection. If you don’t set the custom color in both locations, you will probably run into issues where the color does dot always change as you expect it to.