@antv/g2
Version:
the Grammar of Graphics in Javascript
11 lines (10 loc) • 323 B
TypeScript
/**
* Calculate the contrast. see https://webaim.org/resources/contrastchecker/
* @param foreground
* @param background
*/
export declare function contrast(foreground: any, background: any): number;
/**
* Reverse color for max contrast.
*/
export declare function mostContrast(color: any, palette: string[]): string;