matplotlib.colors.to_rgba#
- matplotlib.colors.to_rgba(c,alpha=None)[source]#
Convertc to an RGBA color.
- Parameters:
- ccolor or
np.ma.masked - alphafloat, optional
Ifalpha is given, force the alpha value of the returned RGBA tupletoalpha.
If None, the alpha value fromc is used. Ifc does not have analpha channel, then alpha defaults to 1.
alpha is ignored for the color value
"none"(case-insensitive),which always maps to(0,0,0,0).
- ccolor or
- Returns:
- tuple
Tuple of floats
(r,g,b,a), where each channel (red, green, blue,alpha) can assume values between 0 and 1.
Examples usingmatplotlib.colors.to_rgba#
On this page