The short answer
Choose the beer to match the whole dish, not just a single ingredient. A light plate, a hearty crust and a sweet dessert each call for different styles. Fixed rules based on color won't help you much here.

Two approaches: similarity or contrast
There are two ways to bring beer and food together. With the first, you look for similarity — a roasty beer with a roasted crust, for example. With the second, you look for contrast — something fresh alongside something heavy. Both approaches work. Try out which one suits you better.
First, pay attention to the intensity. A delicate dish disappears next to a very robust beer. Conversely, a hearty dish overwhelms a light beer. Only after that do you look at the individual characteristics: bitterness, carbonation, and sweetness. A roasty beer comes across completely differently alongside food than a fresh, hoppy one.
Rigid rules based on color are too crude for this task. "Dark beer with dark meat" sounds memorable but often misses the mark. Color tells you something about the malt. It says nothing about bitterness or carbonation.
Beer has two more tools than wine. One is carbonation, the other is bitterness. Both clear the palate. Carbonation lifts away fat, bitterness sets a counterpoint to sweetness and salt. That's why beer often pairs better than wine with fatty and savory dishes.
When choosing, think about the whole plate. The sauce often matters more than the meat. A sweet barbecue sauce changes a dish more than the side dish next to it. So ask yourself: what's the most powerful element here? Base your beer choice on that answer.
Three combinations to try
Three starting points to recreate. With mild vegetables, go for a restrained pale beer. With roasted dishes, try a maltier style. With a sweet dessert, a more robust beer that itself leans sweet is worthwhile. These three suggestions aren't rules. They're starting points from which you continue exploring.
Always try a complete bite. Bring sauce and side dish along on the fork. A piece of meat alone tells you little about the finished plate. Only the combination shows you whether the beer beside it holds up.
With the sequence, many people make the same mistake. Start with the beer, then the bite. Whoever eats first tastes the beer through the food. Whoever drinks first has a clean point of reference. In the second round, reverse it and compare both directions.
If the combination seems too bitter or too heavy, change only one thing next time. Either the beer or the preparation. If you change both at once, you won't know afterward what helped. Two lines on a note are enough as a memory aid.
A non-alcoholic beer is just as deliberate a choice here. It brings carbonation and often bitterness too. What matters with food is what's actually in the glass. A beer style's reputation doesn't help you at the table. A simple pale lager can carry a plate better than a celebrated rarity.
