gensbi.utils.misc#

Attributes#

Functions#

get_colored_value(val[, thresholds])

Returns the value wrapped in color codes based on thresholds.

Module Contents#

gensbi.utils.misc.get_colored_value(val, thresholds=(1.1, 1.2))[source]#

Returns the value wrapped in color codes based on thresholds.

Parameters:
  • val (float) – The value to color.

  • thresholds (tuple of float) – Thresholds for coloring (red/yellow, yellow/green). Defaults to (1.1, 1.2).

Returns:

The colored string representation of the value.

Return type:

str

gensbi.utils.misc.GREEN = '\x1b[92m'[source]#
gensbi.utils.misc.RED = '\x1b[91m'[source]#
gensbi.utils.misc.RESET = '\x1b[0m'[source]#
gensbi.utils.misc.YELLOW = '\x1b[93m'[source]#