code: public void updateSelection(Color color) {
          setFocusedSquare(null);
  
          for (ColorSquare c : colorPickerGrid.getSquares()) {
              if (c.rectangle.getFill().equals(color)) {
                  setFocusedSquare(c);
                  return;
              }
          }
          // check custom colors
          for (Node n : customColorGrid.getChildren()) {
              ColorSquare c = (ColorSquare) n;
              if (c.rectangle.getFill().equals(color)) {
                  setFocusedSquare(c);
                  return;
              }
          }
      }
docs: The skin can update selection if colorpicker value changes..