python_codes.plot_functions.rgba_to_rgb#
- rgba_to_rgb(color)[source]#
Convert a RGBA color to RGB taking transparency into account. From https://stackoverflow.com/a/52101597/9530017.
- Parameters
color (np.array, shape (N, 4)) – RGBA color array.
- Returns
RGB color array.
- Return type
np.array, shape (N, 3)