@microsoft/fast-components > Palette > colorContrast
Palette.colorContrast() method
Returns a swatch from the palette that most closely matches the contrast ratio provided to a provided reference.
Signature:colorContrast(reference: Swatch, contrast: number, initialIndex?: number, direction?: 1 | -1): T;
Parameters
| Parameter | Type | Description |
|---|---|---|
| reference | Swatch | |
| contrast | number | |
| initialIndex | number | |
| direction | 1 | -1 |
T