public static Color rangedValueToColor(double rangedValue) {
    // Old variant of coloring.
    // noinspection UseJBColor
    // return  new Color((int)Math.round(255 * rangedValue), 0, (int)Math.round(255 * (1 - rangedValue)), 130);

    if (JBColor.isBright()) {
      return Color.getHSBColor(240 / 360f, (float)rangedValue * 0.7f, 1f);
    }
    else {
      return Color.getHSBColor(240 / 360f, 220 / 360f, (float)rangedValue * 0.7f);
    }
  }
public static Color rangedValueToColor(double rangedValue)