def re_color(self, text):
        for colorname, regex in self.re_fgs:
            text = regex.sub(r'''<span class="%s">\1</span>''' % colorname, text)
        for bgname, regex in self.re_bgs:
            text = regex.sub(r'''<span class="%s">\1</span>''' % bgname, text)
        return self.re_normal.sub("", text)
:type content: dict
dataset/ETHPy150Open evennia/evennia/evennia/utils/text2html.py/TextToHTMLparser.re_color--crossover with--dataset/ETHPy150Open pcn/pyKairosDB/pyKairosDB/util.py/content_by_name_substring