title: How to change or override the tooltip in JavaFX ColorPicker
body: <p>I am using JavaFX ColorPicker in my application. As per my requirements,  I have mapped the default colors on the color picker to a number. I want this number to be displayed as tooltip on hover over the color instead of hex value of the color. How can I achieve this?</p>
  
  <p>//Part of Code</p>
  
  <p>public void handleNodes(Circle circularNode) {</p>
  
  <pre><code>    final Delta offset = new Delta();
  
      circularNode.setOnMouseEntered(new EventHandler&lt;MouseEvent&gt;() {
          @Override 
          public void handle(MouseEvent event) {
              ((Circle)(event.getSource())).setCursor(Cursor.HAND);
          }
      });
  
      circularNode.setOnMousePressed(new EventHandler&lt;MouseEvent&gt;() {
          @Override 
          public void handle(MouseEvent event) {
                      if(event.getButton().equals(MouseButton.SECONDARY)) {
                  System.out.println("Right click");
  
                  Circle parent = ((Circle)(event.getSource()));
  
                  final ContextMenu contextMenu = new ContextMenu();
                  MenuItem editLabel = new MenuItem("Edit Label");
                  editLabel.setOnAction(new EventHandler&lt;ActionEvent&gt;() {
                      @Override
                      public void handle(ActionEvent event) {
                        System.out.println("Edit Label");
  
                        final ColorPicker colorPicker = new ColorPicker();
                        colorPicker.setStyle("-fx-border-radius: 10 10 10 10;" 
                                              + "-fx-background-radius: 10 10 10 10;");
                        colorPicker.setValue((Color) parent.getFill());
                                        colorPicker.showingProperty().addListener((obs,b,b1)-&gt;{
                            if(b1){
                                PopupWindow popupWindow = getPopupWindow();
                                javafx.scene.Node popup =            popupWindow.getScene().getRoot().getChildrenUnmodifiable().get(0);
                                popup.lookupAll(".color-rect").stream()
                                    .forEach(rect-&gt;{
                                        Color c = (Color)((Rectangle)rect).getFill();
                                        Tooltip.install(rect.getParent(), new Tooltip("Custom tip for "+c.toString()));
                                    });
                            }
                        });
  
                        panelMain.getChildren().add(colorPicker);                       
                      }
                  });
  </code></pre>