The BlendMode chooses the lighter (or darker, respectively) component of the two sources and uses it to produce the result. In the following screenshot, both inputs are blended with the same white-to-black gradient:
The code is pretty similar, but note we are using ColorInput for the first time in this book:
// chapter8/combining/LightAndDarkDemo.javapublic void start(Stage primaryStage) { VBox root = new VBox(10); root.setPadding(new Insets(10)); final Image image = new Image("https://raw.githubusercontent.com/sgrinev/mastering-javafx-9-10-book/master/resources/sample.jpg", 200, 200, true, true); Stop[] stops = new ...