For web this is done with 1 line of Javascript and a div with rounded borders, really
const initials = name.split(' ').map((n) => n.substr(0,1)).slice(0,2).join('')
<div style="border-radius: 9999px; background-color: navy">
<initials here>
</div>
Adjust width, height, font-size to your liking