Module org.jfree.chart3d
Package org.jfree.chart3d.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

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

## Method Details

### getColor

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

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(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