ColorInput produces the output similar to a coloured Rectangle. It doesn't display the node but the rectangular box. It is mainly passed into the other effects as an input. The class javafx.scene.effect.ColorInput represents the ColorInput effect. The object of this class is passed as an input for the other effects.
Properties of the class javafx.scene.effect.ColorInput along with their setter methods are described below in the table.
||It is of double type. It represents the height of the region that is to be filled.
||It represents the paint with which the region is to be filled.
||It is of double type. It represents the width of the region that is to be filled.
||It represents the X coordinate of the top left corner of region.
||It represents the Y coordinate of the top left corner of the region.
The class contains two constructors.
- public ColorInput() : Creates a new instance of ColorInput with the default parameters.
- public ColorInput(double x, double y, double width, double height, Paint paint) : Creates a new instance of ColorInput with the specified parameters.
The following example illustrates the working of ColorInput effect.