I have a label (or any other component) on which I’m binding the background color to an expression. The expression is darker(color(255,255,0)). Once I apply the binding, the following is shown as the value: java.awt.Color[r=178,g=178,b=0].
The issue is that the binding doesn’t affect the color at all, even though the little color swatch next to the property shows the proper color returned by the expression binding. Whatever color the label was without the binding, is the color shown on the label. Essentially, it appears that the binding is ignored. Is there something I’m doing wrong?
Excellent solution! Your first suggestion actually works better for my current need though. I’m actually not using a label as I stated in the post. It’s actually the stopColor property on the gradient of a SVG I built (seemed too complicated to explain in the forum). The stopColor is a property of the style for one of the fill/paint stops. I’m not sure if a style can be applied to a style.?
I like your second solution better for almost every other place where the brightness needs to be adjusted.
Without reduced brightness:
With reduced brightness :
I think the reduced brightness gives it more depth.