Skip to content

Add the ability to return relative luminance#2

Merged
mkdynamic merged 1 commit intomkdynamic:masterfrom
mpchadwick:feature/relative-luminance
Nov 13, 2017
Merged

Add the ability to return relative luminance#2
mkdynamic merged 1 commit intomkdynamic:masterfrom
mpchadwick:feature/relative-luminance

Conversation

@mpchadwick
Copy link
Contributor

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
Copy link
Owner

Awesome, thanks!

@mkdynamic mkdynamic merged commit dabad51 into mkdynamic:master Nov 13, 2017
@mpchadwick
Copy link
Contributor Author

@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
Copy link
Owner

mkdynamic 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants