-
Notifications
You must be signed in to change notification settings - Fork 264
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
Contrast Ratio Calculation #75
Comments
Hi there! Can you elaborate a bit on exactly what you'd like to have added? |
Sorry if this was a bit short. I believe that the calculation of the contrast ratio between two colors as defined by the W3C would be a good addition to the library. Lea Verou implemented this calculation for a Web-Tool and I adapted it to use it with your library. So my question was if you would be interested that I add my adaption inside the library or do you consider it out of scope. |
I would consider it out of scope simply because it's a destructive calculation. For instance, you can derive a ratio between two colors, but a single color cannot result in a contrast ratio and vice versa a contrast ratio cannot be used to create a specific color, hence landing this outside the scope of this library. Unless, that is, I'm misunderstanding the concept here (which is entirely possible). |
What you described was my main concern why I wanted to ask before doing anything. Thank you for your time. |
No problem! Thank you for the issue :) 👍 |
Hi,
I am working with your library in a current project and need contrast ratio calculation between two colors.
Would you consider a pull request to add this functionality?
Thank you for your work on the library.
The text was updated successfully, but these errors were encountered: