Walls soak up paint as they age, as well as change color depending on light. While it makes sense to just repair the little section, chances are you’ll need to repaint the entire wall so you don’t see the repaired and repainted sections.