Preheat the oven to 400°F (200°C). If necessary, slice the red potatoes into uniform 1/8-inch-thick rounds and finely chop the sweet yellow onion. Shred the cheddar and Parmesan cheeses if they have not already been prepared.
Place a medium saucepan over medium heat and melt the butter until it begins to bubble gently.
Add the flour, dried parsley, garlic powder, dried thyme, salt, paprika, and black pepper to the melted butter. Stir continuously until thoroughly combined, then cook the mixture for approximately 1 minute, keeping it moving so the roux bubbles without browning.
Reduce the heat to low. Gradually pour the milk into the roux while stirring constantly to maintain a smooth consistency and prevent lumps from forming.
After all the milk has been incorporated, return the heat to medium and bring the mixture to a gentle simmer. Continue stirring until the sauce thickens, approximately 1 minute.
Remove the saucepan from the heat. Add the shredded cheddar and grated Parmesan, stirring until both cheeses have melted completely and the sauce is thick, smooth, and evenly blended.
Lightly coat a 9 × 13-inch baking dish with butter or cooking spray.
Spread half of the sliced red potatoes across the bottom of the prepared dish in an even layer. Distribute all of the chopped onion over the potatoes.
Pour approximately half of the cheese sauce over the potato-and-onion layer, spreading it evenly so the vegetables are well coated.
Arrange the remaining potato slices over the first layer. Pour the rest of the cheese sauce across the top, ensuring the potatoes are thoroughly covered.
Bake in the preheated oven for 45–55 minutes, or until the sauce is bubbling and the potato slices are tender when pierced with a fork.
For a more deeply browned, bubbling surface, broil the dish for an additional 2 minutes at the end of baking, watching it closely to prevent scorching.
Allow the scalloped potatoes to rest for approximately 10 minutes before serving so the sauce can settle slightly and the layers are easier to portion.