cohydra.util¶
Internal utility functions.
Functions
Calculates a color on the hue-spectrum for a specific network. |
|
Runs a method (successfully) only once per instance. |
|
-
cohydra.util.
network_color_for
(network, number_of_networks)[source]¶ Calculates a color on the hue-spectrum for a specific network.
- Parameters
network (int) – The 0-based index of the network.
number_of_networks (int) – The overall number of networks available.
- Returns
r (int) – The red value (0-255).
g (int) – The green value (0-255).
b (int) – The blue value (0-255).