Color the threshold values based on my query variables in grafana 7

How can i color the threshold values based on my query variables in grafana 7 ?. For example i have a stats panel dashboard to monitor the critical and info alerts. i need to give red color for all critical alerts values and orange color for info alerts values. is there way to do that?