com.orsoncharts.renderer

## Class FixedColorScale

- java.lang.Object
- - com.orsoncharts.renderer.FixedColorScale

- All Implemented Interfaces:
    ColorScale, java.io.Serializable

      public class FixedColorScale
      extends java.lang.Object
      implements ColorScale, java.io.Serializable

  A `ColorScale` that returns the same color for every value on the scale. This is used by the `SurfaceRenderer` when there is no need to represent different value levels by color.
  NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
  Since:
    1.1
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FixedColorScale(java.awt.Color color)` Creates a new `FixedColorScale` instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object obj)` Tests this instance for equality with an arbitrary object.
    `Range` | `getRange()` Returns the range `0.0` to `1.0` always.
    `java.awt.Color` | `valueToColor(double value)` Returns a single color (as specified in the constructor) for all values.

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

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

- - ### Constructor Detail

    - #### FixedColorScale

          public FixedColorScale(java.awt.Color color)

      Creates a new `FixedColorScale` instance.
      Parameters:
        `color` - the color (`null` not permitted).

  - ### Method Detail

    - #### getRange

          public Range getRange()

      Returns the range `0.0` to `1.0` always.
      Specified by:
        `getRange` in interface `ColorScale`
      Returns:
        The range (never `null`).

    - #### valueToColor

          public java.awt.Color valueToColor(double value)

      Returns a single color (as specified in the constructor) for all values.
      Specified by:
        `valueToColor` in interface `ColorScale`
      Parameters:
        `value` - the value.
      Returns:
        The fixed color.

    - #### equals

          public boolean equals(java.lang.Object obj)

      Tests this instance for equality with an arbitrary object.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `obj` - the object (`null` permitted).
      Returns:
        A boolean.