I used this code in API 2 but I can not find equivalent code for API 3. I want to create different colors for markers depending on severity so they are not static values. I have
GIcon is no longer part of GMap API V3. But Gabriel Schneider created a Marker extension which solves your problem.
StyledMarker with documentation and examples.
This example demonstrates color changes for the default GMap icons with a letter added. Example
I think you'd want something like:
var styleMaker1 = new StyledMarker({styleIcon:new StyledIcon(StyledIconTypes.MARKER,{color:"66FF33"}),position:myLatLng,map:map});
... // etc.