While there are lots of ways to change color content of a Grasshopper definition, here is a script that will color code groups for Rhino.Inside.Revit for common identification of components in Revit:
GroupColor-Selected.gh (23.2 KB)
Based on the color specification here: Dynamo Graphic Standards at White arkitekter AB - Dynamo BIM
Thank you to @timonielsen for the original Grasshopper script this is based on here: Rhino News, etc.: Color coding groups fast in Grasshopper
And @eirannejad tweaked it a little by adding the Selected Only
toggle.
Hope someone finds it useful,