code: def _color_attr(self, ground, attr):
          
          attr = colors[ground][attr] 
          attrs = self.cursor_attributes
          if ground == "foreground":
              self.cursor_attributes = (attrs[0], attr, attrs[2])
          elif ground == "background":
              self.cursor_attributes = (attrs[0], attrs[1], attr)
docs: Given a color attribute, set the current cursor appropriately.