from colorspace import rainbow
rainbow().colors(4)['#FF0000', '#80FF00', '#00FFFF', '#8000FF']
Documentation built with Python 3.11.10, pyp2qmd 0.1.1 and quarto 1.5.57 on GitHub.
Returns the colors of the current color palette.
rainbow.colors(n=11, alpha=None, **kwargs)
nint
11.
alphaNone, float, list, or numpy.ndarray
n and be convertible to float, providing values between 0.0 (full opacity) and 1.0 (full transparency)
**kwargs
rev = True to reverse the colors.
list: Returns a list of str with n colors from the color palette.
ValueError: If input n is not float/int or smaller than 1.