Around 2017-ish, there was a moment where red and green were a BIG no no...and if you used it, the dataviz police would come with their cop cars to let you know that it was WRONG. I will admit to having my moments of policing...whether I said them in my head or out loud. But like many things, if we only read the headline, we miss the whole story.
When it comes to red and green, the story is contrast, not the colors per se.
Contrast is Queen (or King, if you prefer)
So, I when I was creating a comet chart for practice, I color encoded the data with a light red and a dark green.
I checked these colors, just to make sure I was okay and yes--I was.
If you'd like, you can review the WebAIM site to explore the different aspects of how to use these two colors together. I also found a different website than the Coblis Color Blindness Simulator that I typically use to check for color blindness. I used a simulator from Pilestone that I thought had a great experience as well. The following is a screen recording of me testing these two colors for color deficiency.
I addressed the technical aspects of red and green, but when there are alternative palettes out there, why would I use red and green? Color association. People understand that red means loss, danger, bad whereas green means good, health, profit, growth.
The big takeaways:
know the story, not just the headline
red and green are okay to use, just check the contrast first.