@ux-aspects/ux-aspects
Version:
Open source user interface framework for building modern, responsive, mobile big data applications
14 lines (13 loc) • 599 B
TypeScript
import { ThemeColor } from '../../../services/color/index';
import * as i0 from "@angular/core";
export declare class ContrastService {
/**
* Calculate the contract ratio between two colors.
* This uses the official WCAG Color Contrast Ratio
* Algorithm: https://www.w3.org/TR/WCAG20-TECHS/G17.html
*/
getContrastColor(backgroundColor: ThemeColor, lightColor: ThemeColor, darkColor: ThemeColor): ThemeColor;
private getLuminance;
static ɵfac: i0.ɵɵFactoryDeclaration<ContrastService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<ContrastService>;
}