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 the ability to return relative luminance #2

Merged
merged 1 commit into from Nov 13, 2017

Conversation

@mpchadwick
Copy link
Contributor

commented Nov 13, 2017

I need this feature currently for a project I'm working on, pygments-high-contrast-stylesheets.

This script parses the stylesheet and identifies style rules with insufficient color contrast for the text against the background color. It also attempts to provide a recommendation for changing the text color. Whether or not to call lighten or darken depends on the relative luminance of the background and text color. This change would allow me to access that info from this library, which I've been using.

It could come in handy for others as well.

@mkdynamic

This comment has been minimized.

Copy link
Owner

commented Nov 13, 2017

Awesome, thanks!

@mkdynamic mkdynamic merged commit dabad51 into mkdynamic:master Nov 13, 2017

@mpchadwick

This comment has been minimized.

Copy link
Contributor Author

commented Nov 13, 2017

@mkdynamic Wow. I think this is the fastest I've ever had a PR merged! Excellent job as a maintainer! Would you mind bumping the version and pushing to Ruby gems?

@mkdynamic

This comment has been minimized.

Copy link
Owner

commented Nov 13, 2017

Haha, thanks for making a PR that was an easy merge :)

Just pushed a new version to RubyGems:

$ gem push wcag_color_contrast-0.1.0.gem 
Pushing gem to https://rubygems.org...
Successfully registered gem: wcag_color_contrast (0.1.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.