I\'ve been inspecting the \"caspian.css\" distributed by Oracle in the JavaFX runtime library, and I see they have declared some color values as variables. Eg:
I know it is a quite old question but I couldn't find any answer with a similar approach as mine. As the previous answer already says it is not possible with standard css except for colors. (Please correct me if I am wrong)
Nevertheless, it is possible if you are using less. I use less in one of my JavaFX projects and it works really well. You just have to configure your build process to compile your less files and generate the actual css files. I used maven in my project and below you can find my build configuration.
With this configuration I'm now able to use less and there is no problem to define custom variables. I use a color-catalogue.less file in my project which all other less files can import via the import attribute. Maybe this solution helps anyone.
Edit: If anyone is interested, a working example can be found here.