Javafx - Get RGB Value from Node's Color Fill

Viewed 11151

In my javafx app, I create a circle and then allow the user to color it in...

Circle circle = new Circle();
circle.setFill(colorPicker.getValue());

Then I need to later fetch the color that the circle is and get the RGB values into hex form (#FFFFFF)

circle.getFill(); //returns a Paint object

How do I get the fill in RGB hex form??

1 Answers
Related