Can we blend specific colors together?

Hi, I don't work with live action footage but 2D animation. I am hoping it is possible to blend/blur specific colors together. As you can see in the example image, only the borders of specific colors are blended together (for example base colors and their shadow counterparts), leaving colors like the black outlines untouched.

The below image shows the result of using a plugin (for After Effects only) called OLM Blur, and to use it you must key the colors you want to blur together.

I've not had much luck recreating the effect in HitFilm so far (I'm still learning), any advice is greatly appreciated!