Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    enhance-contrastpublic

    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

    Keywords

    none

    install

    npm i enhance-contrast

    Downloadsweekly downloads

    3

    version

    0.2.1

    license

    MIT

    repository

    githubgithub

    last publish

    collaborators

    • avatar