JavaFX ColorAdjust Effect
JavaFX allows us to adjust the color of an image by adjusting the properties like hue, saturation, brightness and contrast of the color of image. The class javafx.scene.effect.ColorAdjust contains various properties and methods that can be used to apply the ColorAdjust effect on the node.
The properties of the class javafx.scene.effect.ColorAdjust along with their setter methods are described below.
||Adjustment made in brightness of the color. It is a double type property.
||Adjustment made in contrast of the color. It is of double type property.
||Adjustment made in hue of the color. It is of double type property.
||Input value for the effect. It is of double type property.
||Adjustment made in saturation of the color. It is of double type property.
The class contains two constructors given below.
- public ColorAdjust() : creates the new instance of ColorAdjust with the default parameters.
- public ColorAdjust(double hue, double saturation, double brightness, double contrast) : Creates the new instance of the ColorAdjust with the specified parameters.
In the below example, the ColorAdjust Effect has been applied to the image with the certain properties. The comparison is being shown between the effected image and the original image as the output.