private static int toLineMarkerColor(int gray, int color) {
    int value = (int)(gray * 0.6 + 0.32 * color);
    return value < 0 ? 0 : Math.min(value, 255);
  }
private static int toLineMarkerColor(int gray, int color)