You can use text images and use variables for the properties that need to change. So you could use a variable for the text itself and for the background color:
if not imageFound((text:textVar, textFont:"Arial", textSize:"8", textBackgroundColor:colorVar)) then
//do something or log an error
end if