Hi there,
edit this line of the PHP:
<div class="avatar"><?php echo get_avatar( get_the_author_meta( $author_id )); ?></div>
This time we’ll replace the PHP with an image like so:
<div class="avatar"><img src="full_url_to_your_media_attachment" width="50" height="50"></div>
To add a colored background look for this CSS and include the background-color property i have adder here:
.author-box {
padding: 4%;
margin-top: 60px;
font-size: .8em;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
background-color: #ccc; /* Adjust color to suit */
}