If I understood correctly, you want to use a picture without any background.
for this, you should use a transparent png like this:
body{
background:lightblue
}
<img src="https://sb.kaleidousercontent.com/67418/800x533/9e7eebd2c6/animals-0b6addc448f4ace0792ba4023cf06ede8efa67b15e748796ef7765ddeb45a6fb-removebg.png" width="500"/>
And if you want to add your voluntary color to the picture background like your sample:
img{
background: linear-gradient(45deg, #cb2d2d, #172aec);
}
body{
background:lightblue;
}
<img src="https://sb.kaleidousercontent.com/67418/800x533/9e7eebd2c6/animals-0b6addc448f4ace0792ba4023cf06ede8efa67b15e748796ef7765ddeb45a6fb-removebg.png" width="500"/>
But if your picture isn't transparent, I think you must make it transparent on photoshop at first.
clipproperty in css.