def _set_foreground(self, value, attrlist): if value not in COLOR_RGB: logging.getLogger(__name__).info('This color is not supported' + '=> %s' % value) color = COLOR_RGB.get(value, COLOR_RGB['black']) attrlist.change(pango.AttrForeground(color[0], color[1], color[2], 0, -1))
def _set_foreground(self, value, attrlist): if value not in COLOR_RGB: logger.info('This color is not supported => %s', value) color = COLOR_RGB.get(value, COLOR_RGB['black']) if hasattr(Pango, 'AttrForeground'): attrlist.change(Pango.AttrForeground( color[0], color[1], color[2], 0, -1))
def _set_foreground(self, value, attrlist): if value not in COLOR_RGB: logging.getLogger(__name__).info('This color is not supported' + '=> %s' % value) color = COLOR_RGB.get(value, COLOR_RGB['black']) attrlist.change( pango.AttrForeground(color[0], color[1], color[2], 0, -1))