Assigned Colors Based on Dashboard Variable

I have a question, and I’m not sure if it is possible or not. Basically, I created a variable on the dashboard named $flag, with custom values: Red, Orange, Yellow.

The next step is that I want to replicate all the panels in a row (which I choose to replicate for the variable $flag). In each panel, I have a query that looks more or less like this:

SELECT COUNT(var1)
FROM TabA A
WHERE $__timeFilter(Day)
AND A.flag = $flag
GROUP BY day;

Finally, depending on the value of the variable $flag , I would like to have a different color for each value of $flag . Is this possible?