@tabuckner/random-contrast-compliant-ts
Version:
This project was bootstrapped with [TSDX](https://github.com/jaredpalmer/tsdx).
10 lines (9 loc) • 601 B
TypeScript
import { IParsedColorObjects } from '../models/parsed-color-objects.interface';
/**
* Given a `backgroundColor`, optional `contrastRatioMinimum`, and optional `contrastRatioMaximum`
* returns a random `IParsedColor`.
* @param backgroundColor A Valid CSS string for the background color.
* @param contrastRatioMinimum A valid CSS string for the foreground color.
* @param contrastRatioMaximum Maximum WCAG contrast ratio.
*/
export declare const getRandomContrastCompliant: (backgroundColor: string, contrastRatioMinimum?: number, contrastRatioMaximum?: number) => IParsedColorObjects;