Color

class pmeshlab.Color
__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: pmeshlab.Color, r: int, g: int, b: int) -> None

Constructs a color with the int RGB values r, g, b, and the alpha-channel (transparency) value of 255.

  1. __init__(self: pmeshlab.Color, r: int, g: int, b: int, a: int) -> None

Constructs a color with the int RGB values r, g, b, and the alpha-channel (transparency) value of a.

alpha(self: pmeshlab.Color) int

Returns the alpha color component of this color as integer.

alpha_f(self: pmeshlab.Color) float

Returns the alpha color component of this color as float.

blue(self: pmeshlab.Color) int

Returns the blue color component of this color as integer.

blue_f(self: pmeshlab.Color) float

Returns the blue color component of this color as float.

green(self: pmeshlab.Color) int

Returns the green color component of this color as integer.

green_f(self: pmeshlab.Color) float

Returns the green color component of this color as float.

red(self: pmeshlab.Color) int

Returns the red color component of this color as integer.

red_f(self: pmeshlab.Color) float

Returns the red color component of this color as float.

set_alpha(self: pmeshlab.Color, a: int) None

Sets the alpha color component of this color to a. Integer components are specified in the range 0-255.

set_alpha_f(self: pmeshlab.Color, a: float) None

Sets the alpha color component of this color to a. Integer components are specified in the range 0-255.

set_blue(self: pmeshlab.Color, b: int) None

Sets the blue color component of this color to b. Integer components are specified in the range 0-255.

set_blue_f(self: pmeshlab.Color, b: float) None

Sets the blue color component of this color to b. Float components are specified in the range 0-1.

set_green(self: pmeshlab.Color, g: int) None

Sets the green color component of this color to g. Integer components are specified in the range 0-255.

set_green_f(self: pmeshlab.Color, g: float) None

Sets the green color component of this color to g. Float components are specified in the range 0-1.

set_red(self: pmeshlab.Color, r: int) None

Sets the red color component of this color to r. Integer components are specified in the range 0-255.

set_red_f(self: pmeshlab.Color, r: float) None

Sets the red color component of this color to r. Float components are specified in the range 0-1.

to_array3(self: pmeshlab.Color) numpy.ndarray[numpy.int32[3, 1]]

Returns a numpy array of 3 integers containing the rgb components of this color.

to_array3f(self: pmeshlab.Color) numpy.ndarray[numpy.float32[3, 1]]

Returns a numpy array of 3 floats containing the rgb components of this color.

to_array4(self: pmeshlab.Color) numpy.ndarray[numpy.int32[4, 1]]

Returns a numpy array of 4 integers containing the rgba components of this color.

to_array4f(self: pmeshlab.Color) numpy.ndarray[numpy.float32[4, 1]]

Returns a numpy array of 4 floats containing the rgba components of this color.