You can also use the external system avatar functionality.
color becomes a rudimentary hash of the username, so just plug this in for the site setting:
https://yoursite.com/avatar/discourse?h={color}
(this will not work for hosted Discourses, interestingly, as that setting is set as a global override at the current time)