Is there a brush sort of thing to brush over pixels and draw on only a specific color?

So I recently started using aseprite, and I’m sort of learning it by doing sprite edits, like recolors. In the current sprite I’m messing with, there are pixels of one color, but in two different places on the character, like shoes and skin for example. For example, red shoes that in one spot uses the same color as the darker shading pixels on the skin. So basically I was wondering if there’s a way I can brush over areas, like above the shoes, so that I only replace colors within the brush’s radius. I know of the color replace tool to make every pixel on the sprite of a specific color into a different color, but I only need to replace pixels of that color in a specific area. Is that possible?


from the top of my head there are three things you could try:
Either use the “Paint Bucket” tool and check the “continuous” box.
Another way would be using the “Marquee” tool to select only the areas you would want to replace and then paint over the sprite which would only paint within the selection. The marquee tool by default will allow you to add pixels to the selection, so you can encircle even disconnected areas of any shape.
Lastly the “shading” ink allows you to paint only over colors in the selected color range with other colors in the range, which could help freely painting in an area but only affecting the pixels that you want to change.

Hope this helps^^

*Edit: Changed the text once I realised you only want to replace stuff in a specific area.