You are reading an old version of the documentation (v3.0.3). For the latest version see https://matplotlib.org/stable/api/_as_gen/matplotlib.colors.to_rgba_array.html
Version 3.0.3
matplotlib
Fork me on GitHub

matplotlib.colors.to_rgba_array

matplotlib.colors.to_rgba_array(c, alpha=None)[source]

Convert c to a (n, 4) array of RGBA colors.

If alpha is not None, it forces the alpha value. If c is "none" (case-insensitive) or an empty list, an empty array is returned.