import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.effect.ColorAdjust; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.stage.Stage; publicclassColorAdjustEffectExampleextendsApplication { @Override publicvoidstart(Stage stage) { //Creating an image Imageimage=newImage("https://www.ljjyy.com/img/logo.png"); //Setting the image view ImageViewimageView=newImageView(image); //Setting the position of the image imageView.setX(100); imageView.setY(70); //setting the fit height and width of the image view imageView.setFitHeight(200); imageView.setFitWidth(400); //Setting the preserve ratio of the image view imageView.setPreserveRatio(true); //Instantiating the ColorAdjust class ColorAdjustcolorAdjust=newColorAdjust(); //Setting the contrast value colorAdjust.setContrast(0.4); //Setting the hue value colorAdjust.setHue(-0.05); //Setting the brightness value colorAdjust.setBrightness(0.9); //Setting the saturation value colorAdjust.setSaturation(0.8); //Applying coloradjust effect to the ImageView node imageView.setEffect(colorAdjust); //Creating a Group object Grouproot=newGroup(imageView); //Creating a scene object Scenescene=newScene(root, 600, 300); //Setting title to the Stage stage.setTitle("Coloradjust effect example"); //Adding scene to the stage stage.setScene(scene); //Displaying the contents of the stage stage.show(); } publicstaticvoidmain(String args[]){ launch(args); } }