I take the first two letters of the randomly generated username and use those as the initials. If you log into Remarkbox you may set your username and optionally enable Gravatar from the user settings page.
The logic comes from invatar which I pulled into my codebase so that I may inline embed the SVG into an HTML
img tag. All you have to do is "encode" or "quote" the SVG. For example: