A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://matplotlib.org/devdocs/devel/../api/_as_gen/../_as_gen/matplotlib.colors.to_rgba_array.html below:

matplotlib.colors.to_rgba_array — Matplotlib 3.11.0.dev1079+g1663e9af1b documentation

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

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

Parameters:
ccolor or list of color or RGB(A) array

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.

alphafloat or sequence of floats, optional

If alpha is given, force the alpha value of the returned RGBA tuple to alpha.

If None, the alpha value from c is used. If c does not have an alpha channel, then alpha defaults to 1.

alpha is ignored for the color value "none" (case-insensitive), which always maps to (0, 0, 0, 0).

If alpha is a sequence and c is a single color, c will be repeated to match the length of alpha.

Returns:
array

(n, 4) array of RGBA colors, where each channel (red, green, blue, alpha) can assume values between 0 and 1.

Examples using matplotlib.colors.to_rgba_array#

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4