Add the ability to return relative luminance#2
Merged
mkdynamic merged 1 commit intomkdynamic:masterfrom Nov 13, 2017
Merged
Conversation
Owner
|
Awesome, thanks! |
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? |
Owner
|
Haha, thanks for making a PR that was an easy merge :) Just pushed a new version to RubyGems: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
lightenordarkendepends 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.