Skip to content

Commit

Permalink
Merge pull request #68 from smplrspace/next
Browse files Browse the repository at this point in the history
v2.19.0
  • Loading branch information
tibotiber committed Jun 1, 2024
2 parents 59530cf + 86ca088 commit 0a2c647
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/api-reference/color/scales.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ smplr.Color.numericScale({
saturate?: number
nodata?: string
classes?: number | number[]
zeroAsNoData?: boolean
}) => ((n: number | null | undefined) => string)

// example
Expand All @@ -42,6 +43,7 @@ smplr.Color.numericScale({
- `saturate` - _optional_ - is used to change the saturation of the scale. Positive values saturates it, while negative values desaturates it. _Default value: 0._
- `nodata` - _optional_ - is the color used when the value passed to the scale is not valid. _Default value: #6a6c6c._
- `classes` - _optional_ - is used to return a distinct set of colors instead of a continuous scale. A number generates a scale broken into equi-distant classes, while an array lets you choose the "breakpoints" to use for the classes.
- `zeroAsNoData` - _optional_ - should be set to `true` if you want to consider the value `0` as missing data, thus rendering it using the `nodata` color. _Default value: false._

The scales available are:

Expand Down

0 comments on commit 0a2c647

Please sign in to comment.