title: How to pass JavaFX variable into CSS style?
body: <p>I want to take selected color and change background color of button.</p>
  
  <pre><code>private void  handleItemBackAction(ActionEvent eve)
  {
            System.out.println("You clicked Set Background Color of Item!");     
  
          java.awt.Color color=JColorChooser.showDialog(null,"Select a color",java.awt.Color.CYAN);
  
          String hex = Integer.toHexString(color.getRGB() &amp; 0xffffff);
  
          hex="#"+hex;
          Text.setText(hex);
          ShortcutButton.setStyle("-fx-background-color: hex;");
      }
  </code></pre>