package gvs.util;

import javafx.scene.paint.Color;

public class ContrastColor {
  /**
   * Return either black or white depending on the brightness of the input
   * color.
   * 
   * @param color
   * @return either black or white depending on the brightness of the input
   *         color
   */
  public static Color getContrastColor(Color color) {
    double y = color.getBrightness();
    return y >= 0.95 ? Color.BLACK : Color.WHITE;
  }
}

@@ -358,17 +358,26 @@
  double 
-y
+brightness
  = color
@@ -409,9 +409,18 @@
 urn 
-y
+brightness
  %3E= 

rename brightness variable