#Referencing the Color Adjust effect in JavaFX

7 messages ยท Page 1 of 1 (latest)

plain plover
#

I am relatively new to JavaFX and I have been using a CSS file to have a base for my buttons. I am looking to make a light theme and a dark theme, and for that, I want to use the color adjust settings, to adjust the brightness of my ImageViews and by that change them from black to white and vice versa. I did not find any documentation about this CSS reference and I would appreciate any help ๐Ÿ™‚ One thing I found about the ColorAdjust is its FXML implementation

<ColorAdjust brightness="0.75" contrast="0.68" hue="0.73" saturation="0.78"

Here is my CSS code if needed:
.button{
/* Background */
-fx-background-color: transparent;
}
.button:hover{
-fx-background-color: #a1a1a1;
}
.button:pressed{
-fx-background-color: transparent;
}
.imageview{
}
.toolbar{
-fx-background-color: #ffffff;
}โ€œ`

astral islandBOT
#

โŒ› This post has been reserved for your question.

Hey @plain plover! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

mint harness
#

@plain plover the links were of no help? They looked really close to what you want for me ๐Ÿ˜… There were some examples using the CSS strings as parameter to setStyle calls

astral islandBOT
#

๐Ÿ’ค Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.

plain plover
#

Hello, I still need help

livid willow
#

Been a while since i used javafx, and never used it with css, but it looks like you can probably create something like a light style and dark style in css, and then change the class of the button?

I think this stackoverflow link does something similar to what you want, but not sure
https://stackoverflow.com/questions/32625212/convert-color-from-css-to-javafx-color-object