enhance-contrast

0.2.1 • Public • Published

Enhance Contrast

A command line tool that takes a contrast enhanced screenshot of a given web page.

Usage

enhance-contrast url --width 1024 --height 768

The enhance-contrast generates two screenshots. The before.png (normal) and after.png (contrast enhanced). In the contrast enhanced screenshots, the contrast ratios between texts and backgrounds usually pass 4.5:1 (WCAG 2.0 Success Criterion 1.4.3 Contrast (Minimum)).

It also generates contrast.json which includes more detailed information.

Limitations

  • Contrast calculations don't support images of texts
  • Contrast calculations don't support background images (including CSS gradients)
  • Contrast calculations are't accurate in some cases
  • There are no plans to support full page screenshot
  • This tool uses PhantomJS

Powered by

/enhance-contrast/

    Package Sidebar

    Install

    npm i enhance-contrast

    Weekly Downloads

    4

    Version

    0.2.1

    License

    MIT

    Last publish

    Collaborators

    • takenspc