code: def color_code(cls, color):
          
          if not isinstance(color, tuple):
              color = cls.colors[color]
          return "{:d};{}".format(color[0], str(color[1]) if len(color) == 2 else "")
docs: returns code for color
           :param tuple_or_code color: either a tuple as in colors.values or a string key to colors dictionary