import { Color } from '../../../../common/colors' ; import { createCustomCachedSelector } from '../../../../state/create_selector' ; import { getBandsColorScale } from '../../scales/band_color_scale' ; import { ColorBand } from '../../specs/heatmap' ; import { getHeatmapSpecSelector } from './get_heatmap_spec' ; internal export type ColorScale = ( value : number ) => Color ; internal export const getColorScale = createCustomCachedSelector ( [ getHeatmapSpecSelector ] , ( spec ) : { scale : ColorScale ; bands : Required < ColorBand > [ ] ; } => getBandsColorScale ( spec . colorScale , spec . valueFormatter ) ) ;