color#
Colors and utility functions for conversion between different color models.
Classes
A list of pre-defined colors. |
Functions
- color_gradient(reference_colors, length_of_output)[source]#
- Parameters
reference_colors (Iterable[Color]) –
length_of_output (int) –
- Return type
list[Color]
- color_to_int_rgba(color, opacity=1.0)[source]#
- Parameters
color (Color) –
opacity (float) –
- Return type
ndarray
- color_to_rgba(color, alpha=1)[source]#
- Parameters
color (Color | str) –
alpha (float) –
- Return type
np.ndarray
- get_shaded_rgb(rgb, point, unit_normal_vect, light_source)[source]#
- Parameters
rgb (ndarray) –
point (ndarray) –
unit_normal_vect (ndarray) –
light_source (ndarray) –
- Return type
ndarray
- interpolate_color(color1, color2, alpha)[source]#
- Parameters
color1 (Color) –
color2 (Color) –
alpha (float) –
- Return type
Color