i've build an app with one theme and i use for that a CSS file when i finished it i m trying to give the User the choice of choicing colors that he prefer and the CSS file is included in the FXML files for each Stage
*{
-fx-primary :#2A2E37 ;
-fx-secondary : #FFFF8D;
-fx-primarytext : #B2B2B2;
-fx-blue: #1976D2;
-fx-red: #FF0000;
-fx-green:#2E7D32;
}
.root{
-fx-background-color: -fx-primary;
}
i wanna some methode that change the value of my -fx-primary for example and the color will be choosen from a pallette ( i can do that ) and for fxml i use the simple method
<AnchorPane fx:id="rootAnchoreFW" prefHeight="800.0" prefWidth="767.0" stylesheets="@../Style/myTheme.css" >