this isnt your code but could you make this a span too?
generally whenever i edit code i check for \red \blue etc and try to make it into spans for the span god