---
id: fast-colors.colorscale.findnextcolor
title: ColorScale.findNextColor() method
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-colors](./fast-colors.md) &gt; [ColorScale](./fast-colors.colorscale.md) &gt; [findNextColor](./fast-colors.colorscale.findnextcolor.md)

## ColorScale.findNextColor() method

<b>Signature:</b>

```typescript
findNextColor(position: number, contrast: number, searchDown?: boolean, interpolationMode?: ColorInterpolationSpace, contrastErrorMargin?: number, maxSearchIterations?: number): number;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  position | number |  |
|  contrast | number |  |
|  searchDown | boolean |  |
|  interpolationMode | [ColorInterpolationSpace](./fast-colors.colorinterpolationspace.md) |  |
|  contrastErrorMargin | number |  |
|  maxSearchIterations | number |  |

<b>Returns:</b>

number
