UML classes are automatically displayed in different colors depending on their stereotypes, when you have installed this sample extension to Visual Studio Ultimate. When the user changes the stereotype, the color changes.

The code registers an event handler, which listens for creation or deletion of StereotypeInstance objects, and updates the color. The event handler is registered when the model opens, by using a method that is registered to perform validation on open. For more information, see How to Respond to Changes in a UML Model.
You can adapt the source code and extend it to suit your own project. For example, it currently only deals with a small fixed set of stereotypes, which you would want to extend.
To install the extension on your computer, or on another computer where Visual Studio Ultimate is installed:
To uninstall, use Tools>Extension Manager in Visual Studio.
Please post questions and suggestions in the Visualization and Modeling SDK Forum.