pyvista.Color.convert_color_channel#

static Color.convert_color_channel(val: int | integer | float | floating | str) int[source]#

Convert the given color channel value to the integer representation.

Parameters:
valint | float | str

Color channel value to convert. Supported input values are a hex string of length 2 ('00' to 'ff') with an optional prefix ('#' or '0x'), a float (0.0 to 1.0) or an integer (0 to 255).

Returns:
int

Color channel value in the integer representation (values between 0 and 255).