float_rgba#
- property Color.float_rgba: Tuple[float, float, float, float]#
Get the color value as an RGBA float tuple.
Examples
Create a blue color with custom opacity.
>>> import pyvista >>> c = pyvista.Color("blue", opacity=0.6) >>> c Color(name='blue', hex='#0000ff99') >>> c.float_rgba (0.0, 0.0, 1.0, 0.6)
Create a transparent red color using a float RGBA sequence.
>>> c = pyvista.Color([1.0, 0.0, 0.0, 0.2]) >>> c Color(name='red', hex='#ff000033') >>> c.float_rgba (1.0, 0.0, 0.0, 0.2)