ColorAdjust (JavaFX 25)
Description: declaration: module: javafx.graphics, package: javafx.scene.effect, class: ColorAdjust

# Class ColorAdjust

java.lang.Object
javafx.scene.effect.Effect
javafx.scene.effect.ColorAdjust

public class ColorAdjust extends Effect
An effect that allows for per-pixel adjustments of hue, saturation, brightness, and contrast.

Example:

    ColorAdjust colorAdjust = new ColorAdjust();
    colorAdjust.setContrast(0.1);
    colorAdjust.setHue(-0.05);
    colorAdjust.setBrightness(0.1);
    colorAdjust.setSaturation(0.2);

    Image image = new Image("boat.jpg");
    ImageView imageView = new ImageView(image);
    imageView.setFitWidth(200);
    imageView.setPreserveRatio(true);
    imageView.setEffect(colorAdjust);

The code above applied on this image:

produces the following:

Since:
  JavaFX 2.0

- ## Property Summary

  Properties
  Type
  Property
  Description
  `final DoubleProperty`
  `brightness`
  The brightness adjustment value.
  `final DoubleProperty`
  `contrast`
  The contrast adjustment value.
  `final DoubleProperty`
  `hue`
  The hue adjustment value.
  `final ObjectProperty<Effect>`
  `input`
  The input for this `Effect`.
  `final DoubleProperty`
  `saturation`
  The saturation adjustment value.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ColorAdjust()`
  Creates a new instance of ColorAdjust with default parameters.
  `ColorAdjust(double hue, double saturation, double brightness, double contrast)`
  Creates a new instance of ColorAdjust with the specified hue, saturation, brightness, and contrast.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final DoubleProperty`
  `brightnessProperty()`
  The brightness adjustment value.
  `final DoubleProperty`
  `contrastProperty()`
  The contrast adjustment value.
  `final double`
  `getBrightness()`
  Gets the value of the `brightness` property.
  `final double`
  `getContrast()`
  Gets the value of the `contrast` property.
  `final double`
  `getHue()`
  Gets the value of the `hue` property.
  `final Effect`
  `getInput()`
  Gets the value of the `input` property.
  `final double`
  `getSaturation()`
  Gets the value of the `saturation` property.
  `final DoubleProperty`
  `hueProperty()`
  The hue adjustment value.
  `final ObjectProperty<Effect>`
  `inputProperty()`
  The input for this `Effect`.
  `final DoubleProperty`
  `saturationProperty()`
  The saturation adjustment value.
  `final void`
  `setBrightness(double value)`
  Sets the value of the `brightness` property.
  `final void`
  `setContrast(double value)`
  Sets the value of the `contrast` property.
  `final void`
  `setHue(double value)`
  Sets the value of the `hue` property.
  `final void`
  `setInput(Effect value)`
  Sets the value of the `input` property.
  `final void`
  `setSaturation(double value)`
  Sets the value of the `saturation` property.

  ### Methods declared in class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Property Details

  - ### input

    public final ObjectProperty<Effect> inputProperty
    The input for this `Effect`. If set to `null`, or left unspecified, a graphical image of the `Node` to which the `Effect` is attached will be used as the input.
    Default value:
      null
    See Also:
      - `getInput()`
      - `setInput(Effect)`
      - `inputProperty()`

  - ### hue

    public final DoubleProperty hueProperty
    The hue adjustment value.

              Min: -1.0
              Max: +1.0
          Default:  0.0
         Identity:  0.0

    Default value:
      0.0
    See Also:
      - `getHue()`
      - `setHue(double)`
      - `hueProperty()`

  - ### saturation

    public final DoubleProperty saturationProperty
    The saturation adjustment value.

              Min: -1.0
              Max: +1.0
          Default:  0.0
         Identity:  0.0

    Default value:
      0.0
    See Also:
      - `getSaturation()`
      - `setSaturation(double)`
      - `saturationProperty()`

  - ### brightness

    public final DoubleProperty brightnessProperty
    The brightness adjustment value.

              Min: -1.0
              Max: +1.0
          Default:  0.0
         Identity:  0.0

    Default value:
      0.0
    See Also:
      - `getBrightness()`
      - `setBrightness(double)`
      - `brightnessProperty()`

  - ### contrast

    public final DoubleProperty contrastProperty
    The contrast adjustment value.

              Min: -1.0
              Max: +1.0
          Default:  0.0
         Identity:  0.0

    Default value:
      0.0
    See Also:
      - `getContrast()`
      - `setContrast(double)`
      - `contrastProperty()`

- ## Constructor Details

  - ### ColorAdjust

    public ColorAdjust()
    Creates a new instance of ColorAdjust with default parameters.

  - ### ColorAdjust

    public ColorAdjust(double hue, double saturation, double brightness, double contrast)
    Creates a new instance of ColorAdjust with the specified hue, saturation, brightness, and contrast.
    Parameters:
      `hue` - the hue adjustment value
      `saturation` - the saturation adjustment value
      `brightness` - the brightness adjustment value
      `contrast` - the contrast adjustment value
    Since:
      JavaFX 2.1

- ## Method Details

  - ### setInput

    public final void setInput(Effect value)
    Sets the value of the `input` property.
    Property description:
      The input for this `Effect`. If set to `null`, or left unspecified, a graphical image of the `Node` to which the `Effect` is attached will be used as the input.
    Default value:
      null
    Parameters:
      `value` - the value for the `input` property
    See Also:
      - `getInput()`
      - `inputProperty()`

  - ### getInput

    public final Effect getInput()
    Gets the value of the `input` property.
    Property description:
      The input for this `Effect`. If set to `null`, or left unspecified, a graphical image of the `Node` to which the `Effect` is attached will be used as the input.
    Default value:
      null
    Returns:
      the value of the `input` property
    See Also:
      - `setInput(Effect)`
      - `inputProperty()`

  - ### inputProperty

    public final ObjectProperty<Effect> inputProperty()
    The input for this `Effect`. If set to `null`, or left unspecified, a graphical image of the `Node` to which the `Effect` is attached will be used as the input.
    Default value:
      null
    Returns:
      the `input` property
    See Also:
      - `getInput()`
      - `setInput(Effect)`

  - ### setHue

    public final void setHue(double value)
    Sets the value of the `hue` property.
    Property description:
      The hue adjustment value.

                Min: -1.0
                Max: +1.0
            Default:  0.0
           Identity:  0.0

    Default value:
      0.0
    Parameters:
      `value` - the value for the `hue` property
    See Also:
      - `getHue()`
      - `hueProperty()`

  - ### getHue

    public final double getHue()
    Gets the value of the `hue` property.
    Property description:
      The hue adjustment value.

                Min: -1.0
                Max: +1.0
            Default:  0.0
           Identity:  0.0

    Default value:
      0.0
    Returns:
      the value of the `hue` property
    See Also:
      - `setHue(double)`
      - `hueProperty()`

  - ### hueProperty

    public final DoubleProperty hueProperty()
    The hue adjustment value.

              Min: -1.0
              Max: +1.0
          Default:  0.0
         Identity:  0.0

    Default value:
      0.0
    Returns:
      the `hue` property
    See Also:
      - `getHue()`
      - `setHue(double)`

  - ### setSaturation

    public final void setSaturation(double value)
    Sets the value of the `saturation` property.
    Property description:
      The saturation adjustment value.

                Min: -1.0
                Max: +1.0
            Default:  0.0
           Identity:  0.0

    Default value:
      0.0
    Parameters:
      `value` - the value for the `saturation` property
    See Also:
      - `getSaturation()`
      - `saturationProperty()`

  - ### getSaturation

    public final double getSaturation()
    Gets the value of the `saturation` property.
    Property description:
      The saturation adjustment value.

                Min: -1.0
                Max: +1.0
            Default:  0.0
           Identity:  0.0

    Default value:
      0.0
    Returns:
      the value of the `saturation` property
    See Also:
      - `setSaturation(double)`
      - `saturationProperty()`

  - ### saturationProperty

    public final DoubleProperty saturationProperty()
    The saturation adjustment value.

              Min: -1.0
              Max: +1.0
          Default:  0.0
         Identity:  0.0

    Default value:
      0.0
    Returns:
      the `saturation` property
    See Also:
      - `getSaturation()`
      - `setSaturation(double)`

  - ### setBrightness

    public final void setBrightness(double value)
    Sets the value of the `brightness` property.
    Property description:
      The brightness adjustment value.

                Min: -1.0
                Max: +1.0
            Default:  0.0
           Identity:  0.0

    Default value:
      0.0
    Parameters:
      `value` - the value for the `brightness` property
    See Also:
      - `getBrightness()`
      - `brightnessProperty()`

  - ### getBrightness

    public final double getBrightness()
    Gets the value of the `brightness` property.
    Property description:
      The brightness adjustment value.

                Min: -1.0
                Max: +1.0
            Default:  0.0
           Identity:  0.0

    Default value:
      0.0
    Returns:
      the value of the `brightness` property
    See Also:
      - `setBrightness(double)`
      - `brightnessProperty()`

  - ### brightnessProperty

    public final DoubleProperty brightnessProperty()
    The brightness adjustment value.

              Min: -1.0
              Max: +1.0
          Default:  0.0
         Identity:  0.0

    Default value:
      0.0
    Returns:
      the `brightness` property
    See Also:
      - `getBrightness()`
      - `setBrightness(double)`

  - ### setContrast

    public final void setContrast(double value)
    Sets the value of the `contrast` property.
    Property description:
      The contrast adjustment value.

                Min: -1.0
                Max: +1.0
            Default:  0.0
           Identity:  0.0

    Default value:
      0.0
    Parameters:
      `value` - the value for the `contrast` property
    See Also:
      - `getContrast()`
      - `contrastProperty()`

  - ### getContrast

    public final double getContrast()
    Gets the value of the `contrast` property.
    Property description:
      The contrast adjustment value.

                Min: -1.0
                Max: +1.0
            Default:  0.0
           Identity:  0.0

    Default value:
      0.0
    Returns:
      the value of the `contrast` property
    See Also:
      - `setContrast(double)`
      - `contrastProperty()`

  - ### contrastProperty

    public final DoubleProperty contrastProperty()
    The contrast adjustment value.

              Min: -1.0
              Max: +1.0
          Default:  0.0
         Identity:  0.0

    Default value:
      0.0
    Returns:
      the `contrast` property
    See Also:
      - `getContrast()`
      - `setContrast(double)`