Question

I have differnet boxes that have a certain double parameter. This parameter should determine what color the box has. The coloring should start with one color for the double value 0.0 (perhaps blue) and should end with another color for 1.0 (perhaps red). It is more or less what is done here or Conditional coloring based on a gradient.

There are different ways to define a color as stated in Oracle Docs, but it seems quiet difficult to calculate a gradient with these definitions.

Does anyone know a solution for this?

Was it helpful?

Solution

javafx.animation.Interpolator.LINEAR.interpolate(
    color1, color2, fraction
)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top