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. If c is a masked array, an ndarray is returned with a (0, 0, 0, 0) row for each masked value or row in c.

© 2012–2018 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.2.2/api/_as_gen/matplotlib.colors.to_rgba_array.html