code: def value2rgba(x:float, cmap:Callable=cm.RdYlGn, alpha_mult:float=1.0)->Tuple:
      "Convert a value `x` from 0 to 1 (inclusive) to an RGBA tuple according to `cmap` times transparency `alpha_mult`."
      c = cmap(x)
      rgb = (np.array(c[:-1]) * 255).astype(int)
      a = c[-1] * alpha_mult
      return tuple(rgb.tolist() + [a]f value2rgba(x:float, cmap:Callable=cm.RdYlGn, alpha_mult:float=1.0)->Tuple:
      "Convert a value `x` from 0 to 1 (inclusive) to an RGBA tuple according to `cmap` times transparency `alpha_mult`."
      c = cmap(x)
      rgb = (np.array(c[:-1]) * 255).astype(int)
      a = c[-1] * alpha_mult
      return tuple(rgb.tolist() + [a])
docs: Convert a value `x` from 0 to 1 (inclusive) to an RGBA tuple according to `cmap` times transparency `alpha_mult`.