com.mapinfo.midev.style

## Class ColorAdjustment

- java.lang.Object
- - com.mapinfo.midev.style.ColorAdjustment

All Implemented Interfaces:
  Serializable

    public final class ColorAdjustment
    extends Object
    implements Serializable

Defines the replacement of a source color for a destination color, and the opacity of the replacement.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`ColorAdjustment(Color destColor)` Constructs a new `ColorAdjustment` object with a destination color.
`ColorAdjustment(Color destColor, Number opacity)` Constructs a new `ColorAdjustment` object with a destination color and the opacity of the destination color.
`ColorAdjustment(Number opacity)` Constructs a new `ColorAdjustment` object with the given opacity.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals(Object o)`
`Color` `getDestinationColor()` Returns the destination color of the `ColorAdjustment`.
`Number` `getOpacity()` Returns the opacity of the destination color.
`int` `hashCode()`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ColorAdjustment

    public ColorAdjustment(Color destColor,
                           Number opacity)

Constructs a new `ColorAdjustment` object with a destination color and the opacity of the destination color.

Parameters:
  `destColor` - the destination color.
  `opacity` - the opacity of the destination color. Valid range for opacity value is between 0.0 (fully transparent) and 1.0 (fully opaque).

#### ColorAdjustment

    public ColorAdjustment(Color destColor)

Constructs a new `ColorAdjustment` object with a destination color. The opacity of the source color will not be changed.

Parameters:
  `destColor` - the destination color.

#### ColorAdjustment

    public ColorAdjustment(Number opacity)

Constructs a new `ColorAdjustment` object with the given opacity.

Parameters:
  `opacity` - the opacity of the destination color. Valid range for opacity value is between 0.0 (fully transparent) and 1.0 (fully opaque).

### Method Detail

#### getDestinationColor

    public Color getDestinationColor()

Returns the destination color of the `ColorAdjustment`.

Returns:
  the destinationColor.

#### getOpacity

    public Number getOpacity()

Returns the opacity of the destination color. Valid range for opacity value is between 0.0 (fully transparent) and 1.0 (fully opaque).

Returns:
  the opacity.

#### equals

    public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`