#NEWLINE# @ classmethod #NEWLINE# def __call__( cls , * args ) : #NEWLINE# #INDENT# __doc__ = ColorModel . __call__ . __doc__ #NEWLINE# ( h , c , y , mode ) = cls . _args_to_vectors ( args ) #NEWLINE# h = np . mod ( h , 360.0 ) #NEWLINE# c = np . clip ( c , 0 , 1 , out = c ) #NEWLINE# y = np . clip ( y , 0 , 1 , out = y ) #NEWLINE# p = ( h / 60.0 ) #NEWLINE# x = ( c * ( 1 - np . abs ( ( np . mod ( p , 2.0 ) - 1.0 ) ) ) ) #NEWLINE# z = np . zeros_like ( x ) #NEWLINE# ip = np . int64 ( p ) #NEWLINE# col = np . vstack ( ( c , x , z ) ) . transpose ( ) #NEWLINE# rgb = col [ ( np . tile ( np . arange ( len ( x ) ) , ( 3 , 1 ) ) . transpose ( ) , cls . _perm [ ip ] ) ] #NEWLINE# m = ( y - np . dot ( col , cls . _luma_vec ) ) #NEWLINE# rgb += m [ : , np . newaxis ] #NEWLINE# rgb = np . clip ( rgb , 0 , 1 , out = rgb ) #NEWLINE# return cls . _array_to_return ( rgb , mode )