Remember that breath weapons have a large AoE. If the dragon has any intelligence at all (and it does), it's going to try to use its breath weapon on the enemy dragon and the party simultaneously.
Adult black or white dragon breath weapon averages 54 damage, green averages 56, red averages 63, blue averages 66. White, red, and green are cones, making it especially easy for them to catch multiple characters. 60-ish damage stands a good chance of killing characters outright before they hit 5th or so (and is still going to drop all but the toughest characters in the 5-9 range).
On the other hand, the way you're describing the encounter, it's totally opt-in. That's the sort of thing you can justifiably do to PCs even at level one. If they charge into a battle with an adult dragon, that's on them.
EDIT: I threw a young green dragon at my players at 4th level. To take the overwhelming burst damage off the breath weapon, I changed it to create a cloud of poison that did half the listed damage initially, but also made its area a no-go zone for a minute (dealing its damage again if you ended your turn there). I thought this kept the challenge high enough that I wasn't nerfing the monster for my players' benefit, and also made the encounter a bit more thematic and tactically interesting. I'll probably put twists on the other dragons' breath weapons as well, when they come up.