### Navigation

- index
- modules |
- next |
- previous |
- home|
- examples|
- tutorials|
- pyplot|
- docs »
- The Matplotlib API »
- colors »

# matplotlib.colors.to_rgba

`matplotlib.colors.``to_rgba`(c, alpha=None)

  Convert `c` to an RGBA color.

  If `alpha` is not `None`, it forces the alpha value, except if `c` is “none” (case-insensitive), which always maps to `(0, 0, 0, 0)`.

## Examples using `matplotlib.colors.to_rgba`

Line, Poly and RegularPoly Collection with autoscaling

Colours

Visualizing named colors

Lasso Demo

Generate polygons to fill under 3D line graph

Line Collection

Menu