Is there way to color on the outside of polygons like this? I have tried to use the inverted polygon style in QGIS but it didn't work.
I am not sure what was going wrong with inverted polygon style, but here is a simple polygon to show you how to do it:
Go to Layer
Properties -> Style -> Change
Single Symbol to
Notice I used the same color in your question because you want to color the outside polygon with this specific color.
Here is the output:
I'm not aware of another stylistic way to achieve that effect (if inverted pgons is not working), however, you could download the 'mask' plugin (https://plugins.qgis.org/plugins/mask/) which will automatically create an exterior mask around a selected polygon. It creates a new memory polygon layer that you can style however you want.