Filling a sliced box with a background color

I want to fill this box, which I set to ‘Sliced’ with the color shown in the center:

I’ve tried using a Mask, but I can’t seem to find a way to only fill the box and nothing else.
If I just stretch the Image the corners outside of the box will also be filled. If I make the box smaller I can’t fill every pixel of the box.

I need the two to be separate images because I want to make the background color transparent and the box not.

Any suggestions?

You could put a white image with rounded corners as the background (and set to sliced too), then stretch it to the sides and tint it with the color you want.

That worked, thank you.