# shade

function in `@dioramajs/data/heatmap`

```ts
import { shade } from '@dioramajs/data/heatmap'
```

Where a value sits on the color scale, 0..1. Amounts run from 0 (an empty cell) to `top`;
values on both sides of 0 run from -top to top with 0 in the middle. `steps` > 0 snaps to
that many even bins, as a legend can name them.

```ts
function shade(
  value: number,
  top: number,
  split: boolean,
  steps: number,
): number
```

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `number` |  |
| `top` | `number` |  |
| `split` | `boolean` |  |
| `steps` | `number` |  |

Defined in [packages/data/src/heatmap.ts](https://github.com/MasterKurosava/diorama/blob/main/packages/data/src/heatmap.ts#L233).
