Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some use-case helper utilities #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Commits on Jan 12, 2022

  1. Add some use-case helper utilities

    First off, great work on apca, and congrats on publishing it to npm! It's the only algorithm I've used that properly identifies perceived contrast.
    
    There isn't an issue tracker on this repo, so I figured I'd go with this; it probably won't compile, but hopefully it gets the point across.
    
    --
    
    My main use case for this library is determining whether I should use a light or dark color for the foreground text on a background that has a certain color (``testColor`` in the PR code). I'd love to see a helper util similar to this make it in to the library so that people that have this same use case can easily swap apca into their current workflow.
    kavdev authored Jan 12, 2022
    Configuration menu
    Copy the full SHA
    78ec87f View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2022

  1. Added more flexibility to shouldUseDarkText

    Users can now specify values for light and dark text for a more accurate contrast check.
    
    Co-authored-by: James Harris <[email protected]>
    kavdev and wopian authored Jan 14, 2022
    Configuration menu
    Copy the full SHA
    112aa06 View commit details
    Browse the repository at this point in the history