returns code for color
         :param tuple_or_code color: either a tuple as in colors.values or a string key to colors dictionary

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