Skip to content

checkColorContrast

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/apps/web-e2e/src/utils/accessibility.ts

Check color contrast

Signature

ts
async function checkColorContrast(page: Page, selector: string): Promise<{
  foreground: string;
  background: string;
  ratio: number;
  passes: boolean;
}>

Parameters

NameType
pagePage
selectorstring

Returns: Promise<{ foreground: string; background: string; ratio: number; passes: boolean; }>

Was this page helpful?

Download as PDF