maxon.Col3¶
Description¶
maxon.Data
class.maxon.DataType
).Attributes¶
The blue component |
|
The green component |
|
The red component |
Methods Signature¶
|
Returns a vector that is clamped to the range [0.0 . |
Calculates the average value of ‘r’, ‘g’, ‘b’. |
|
|
Returns the maximum of ‘r’, ‘g’, ‘b’. |
|
Return the minimum of ‘r’, ‘g’, ‘b’. |
|
Tests component-wise if the difference is no bigger than ‘epsilon’. |
|
Checks if each component is zero. |
|
Converts the data to the expected type (built-in). |
|
Sets all components to zero. |
|
Initialize self. |
Methods Definition¶
-
Col3.
Clamp01
()¶ Returns a vector that is clamped to the range [0.0 .. 1.0].
- Returns
The color clamped.
- Return type
-
Col3.
GetAverage
()¶ Calculates the average value of ‘r’, ‘g’, ‘b’.
- Returns
the average value.
- Return type
float
-
Col3.
GetMax
()¶ Returns the maximum of ‘r’, ‘g’, ‘b’.
- Returns
The maximum value.
- Returns
float
-
Col3.
GetMin
()¶ Return the minimum of ‘r’, ‘g’, ‘b’.
- Returns
The minimum value.
- Returns
float
-
Col3.
IsEqual
(other, epsilon=0.01)¶ Tests component-wise if the difference is no bigger than ‘epsilon’.
- Parameters
other (
maxon.Col3
) – The other color to compare with.epsilon (float) – The tolerance value.
- Returns
True if both color are identical.
- Return type
bool
-
Col3.
IsZero
()¶ Checks if each component is zero.
- Returns
True if all component is zero.
- Return type
bool
-
Col3.
MaxonConvert
(expected=None)¶ Converts the data to the expected type (built-in).
- Parameters
expected (Any) – The expected type after the conversion.
- Returns
The data converted.
- Return type
Same as expected
-
Col3.
SetZero
()¶ Sets all components to zero.
-
Col3.
__init__
(r=None, g=None, b=None)¶ Initialize self. See help(type(self)) for accurate signature.