com.orsoncharts.renderer.category

## Interface CategoryColorSource

- All Known Implementing Classes:
    StandardCategoryColorSource

      public interface CategoryColorSource

  A color source that can supply the colors for category plots. This is the interface through which the renderer will obtain colors for each data item in the chart. A default implementation (`StandardCategoryColorSource`) is provided and you can customise the rendering colors by providing an alternate implementation.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.awt.Color` | `getColor(int series, int row, int column)` Returns the color for one data item in the chart.
    `java.awt.Color` | `getLegendColor(int series)` Returns the color to be used in the legend to represent the specified series.
    `void` | `style(java.awt.Color... colors)` Restyles the source using the specified colors.

- - ### Method Detail

    - #### getColor

          java.awt.Color getColor(int series,
                                  int row,
                                  int column)

      Returns the color for one data item in the chart. We return a `Color` rather than a paint, because some manipulations are done for the shading during the 3D rendering.
      Parameters:
        `series` - the series index.
        `row` - the row index.
        `column` - the column index.
      Returns:
        The color.

    - #### getLegendColor

          java.awt.Color getLegendColor(int series)

      Returns the color to be used in the legend to represent the specified series.
      Parameters:
        `series` - the series index.
      Returns:
        The color.

    - #### style

          void style(java.awt.Color... colors)

      Restyles the source using the specified colors. Refer to the implementing class to confirm the precise behaviour (typically all existing color settings are cleared and the specified colors are installed as the new defaults).
      Parameters:
        `colors` - the colors.
      Since:
        1.2