def __init__(self, values, mode='<STR_LIT>', alpha=<NUM_LIT:1.0>, wref=_DEFAULT_WREF):
if not(isinstance(values, tuple)):<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>if mode=='<STR_LIT>':<EOL><INDENT>self.__rgb = tuple([float(v) for v in values])<EOL>self.__hsl = rgb_to_hsl(*self.__rgb)<EOL><DEDENT>elif mode=='<STR_LIT>':<EOL><INDENT>self.__hsl = tuple([float(v) for v in values])<EOL>self.__rgb = hsl_to_rgb(*self.__hsl)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>" + mode)<EOL><DEDENT>self.__a = alpha<EOL>self.__wref = wref<EOL>
Instantiate a new grapefruit.Color object.

        Parameters:
          :values:
            The values of this color, in the specified representation.
          :mode:
            The representation mode used for values.
          :alpha:
            the alpha value (transparency) of this color.
          :wref:
            The whitepoint reference, default is 2° D65.