When you repair the floor, remove a piece of the hardwood and take it with you to the store. Then match the stain color as best you can. Then use a new piece of hardwood and stain it to see if the color is close.
Then repair the boards, sand the entire floor, and stain only the new boards...then finish the rest when that dries with your finish coats of urethane.
Or you can borrow some old existing hardwood from a closet and do the repair with new wood where it will not be seen. This takes more work and finesse, but matches just fine.
Good luck, you can doooooo it.