I can't really answer how hard it is or whether there's any open source, but to get it done, you want to take a looki at Custom Text Markers. See these two articles for details:
To go beyond the simple keyword coloring, details on the Visual Studio Syntax coloring is defined here; and details to implement here.
These documents outline how the underlying plumbing is, well, plumbed -- and more importantly, goes into detail on how to wire in your own --
If you want to roll your own, I'd recommend getting DXCore from DevExpress. I know you can add your own visual elements into VS2008 using this add in, and I believe it's free as well. there's a good sized community for assistance with writing your own plugins, and there may even be one already made for you.
I'm a big fan of DevExpress, and I run Refactor! and CodeRush.
Get DXCore, and then start with this plugin: http://www.rorybecker.co.uk/PaintIt.html that should get you started with some code to colorize method names. Rory makes his code available, and I think he is a member here at SO...
Well as Brian has already said... My PaintIt plugin will give you some idea as to what can be done with the DXCore.
Also there are some other "Decorative plugins" on our "Community Plugin Site" and we have a decent community over in the
DevExpress IDE Tools forums if you have any specific questions.
DXCore is the framework on which RefactorPro and CodeRush are built which should give you an idea of what sort
of graphical capability they are capable of.
That said you do not need either of these tools to use the DXCore.
Everything on the Community Site is "Open Source" (So is PaintIt)
To give you an idea of how simple things are... the following code is all you need to add to a basic plugin template get the basics up and running using DXCore...
Private Sub PlugIn_EditorPaintLanguageElement(ByVal ea As DevExpress.CodeRush.Core.EditorPaintLanguageElementEventArgs) Handles Me.EditorPaintLanguageElement
If ea.LanguageElement.ElementType = LanguageElementType.Method Then
ea.PaintArgs.OverlayText(ea.LanguageElement.Name, _
ea.LanguageElement.NameRange.Start, _
Color.HotPink)
End If
End Sub
I have created a plugin (called CR_ColorizeMemberNames) based on this code and added it to the Community Plugin Site.
The binary is available from my site here.
You need only download and install DXCore and place the binary of the plugin in the plugins folder (Defaults to C:\Program Files\Developer Express Inc\DXCore for Visual Studio .NET\2.0\Bin\Plugins).. Then start VS and your method names should all be in HotPink (Lovely)