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 "")
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 "" )
returns code for color
         :param tuple_or_code color: either a tuple as in colors.values or a string key to colors dictionary