You choose the color on resolution. Your opponent does not get to respond between the color choice and the damage happening. They need to use any damage prevention they want before you choose a color.

Artwork
Loading artwork…
Searing Rays
Invasion · #165 · EN
Nonfoil—Foil—
Card rules
Choose a color. Searing Rays deals damage to each player equal to the number of creatures of that color that player controls.
"This is a battle of pawns, for the highest stakes imaginable." —Urza
Uncommon · Illustrated by Doug Chaffee
Format legality
Commander Legal
Duel Legal
Legacy Legal
Oathbreaker Legal
PreDH Legal
Premodern Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Modern Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Penny Not Legal
Pioneer Not Legal
Standard Not Legal
Standard Brawl Not Legal
Timeless Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions