BPY plus – color module

A BPY plus module to simplify work with colors.

Usage example

Color class

equal(color_1, color_2, , rel_tol=1e-09, abs_tol=0.0001)

Compares two colors, return True if they are equal and False if not.

Parameters:

color_1: color to compare

color_2: color to compare

rel_tol: relative tolerance

abs_tol: absolute tolerance

Returns:

Compare result – True or False


random(alpha=False)

Returns random color

Parameters:

alpha: if True – return random alpha too, else return alpha = 1.0

Returns:

A tuple with random color values.


 

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comment
Inline Feedbacks
View all comments