(*lstcol,**kargs)
Returns a generator that mixes provided quantities forever
    trans: a function to convert the three arguments into a color. lambda x,y,z:(x,y,z) by default
Returns a generator that mixes provided quantities forever
    trans: a function to convert the three arguments into a color. lambda x,y,z:(x,y,z) by default
Returns a generator that mixes provided quantities forever trans : a function to convert the three arguments into a color . lambda x y z : ( x y z ) by default
def colgen(*lstcol,**kargs):
    """Returns a generator that mixes provided quantities forever
    trans: a function to convert the three arguments into a color. lambda x,y,z:(x,y,z) by default"""
    if len(lstcol) < 2:
        lstcol *= 2
    trans = kargs.get("trans", lambda x,y,z: (x,y,z))
    while 1:
        for i in range(len(lstcol)):
            for j in range(len(lstcol)):
                for k in range(len(lstcol)):
                    if i != j or j != k or k != i:
                        yield trans(lstcol[(i+j)%len(lstcol)],lstcol[(j+k)%len(lstcol)],lstcol[(k+i)%len(lstcol)])
def colgen ( * lstcol , * * kargs ) : if len ( lstcol ) < 2 : lstcol *= 2 trans = kargs . get ( "trans" , lambda x , y , z : ( x , y , z ) ) while 1 : for i in range ( len ( lstcol ) ) : for j in range ( len ( lstcol ) ) : for k in range ( len ( lstcol ) ) : if i != j or j != k or k != i : yield trans ( lstcol [ ( i + j ) % len ( lstcol ) ] , lstcol [ ( j + k ) % len ( lstcol ) ] , lstcol [ ( k + i ) % len ( lstcol ) ] )