Purple shampoo for brown/black hair??

I’ve been dying my hair dark brown/black for years but after a few washes my hair ALWAYS gets a red/brassy color in the sunlight or just bright light in general. I dyed my hair red in middle school and ever since then dying over my hair it’s always turns red 🤨 Could I use purple shampoo on dark hair to help against the brassy red color shining through? Or is that only for blonde hair only?