code: private static Function<Object, ? extends Color> createCellColorFunction(
          double min, double max, DoubleFunction<? extends Color> colorFunction)
      {
          Objects.requireNonNull(colorFunction, 
              "The colorFunction may not be null");
          
          DoubleUnaryOperator mapping = value -> (value - min) / (max - min);
          Function<Object, Color> cellColorFunction = object ->
          {
              if (object instanceof Number)
              {
                  Number number = (Number)object;
                  double normalized = mapping.applyAsDouble(number.doubleValue());
                  Color color = colorFunction.apply(normalized);
                  return color;
              }
              return null;
          };
          return cellColorFunction;
      }
docs: Creates the function that returns the cell background color for a
  given value. If the value is a number, it will be mapped from
  the range (min, max) to the range (0,1), and the given function
  will be used to look up the color based on that value. If the
  argument is not a number, then the function will return
  <code>null</code>
  
  @param min The minimum of the range
  @param max The maximum of the range
  @param colorFunction The function that maps values in the range (0,1)
  to a color.
  @return The cell color function