createColorScale()
function createColorScale(
minValue,
maxValue,
colorMin,
colorMax
): (value) => string;
Defined in: packages/core/src/heatmap/colormap.ts:25
Builds a value -> color function that linearly interpolates between two
6-digit hex colors across [minValue, maxValue]. Hand-rolled rather than
a colormap dependency, to preserve @pitchkit/core's zero-runtime-dependency
invariant. Values outside the domain are clamped to the nearest end color.
Parameters
| Parameter | Type |
|---|---|
minValue | number |
maxValue | number |
colorMin | string |
colorMax | string |
Returns
(value) => string