Security News
Highlights from the 2024 Rails Community Survey
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
color-check
Advanced tools
Color Check is a very tine library for checking your foreground and backgorunds colors against the WCAG2 color compliance standard.
Color Check is a very tine library for checking your foreground and backgorunds colors against the WCAG2 color compliance standard. There are a range of methods which can be found in the docs including returning the actual values used in calculating the AA, AA 18, AAA and AAA 18 standards as well as color contrast and color difference checks.
There are other libraries such as the excelent color package which will parse any valid css color syntax and provide methods for checking the values needed. This library is smaller and returns boolean values where possible. Being smaller, it requires you to provide the valid hex string or rgb color object. Errors will simply fail.
npm install color-check
var colorCheck = require('color-check');
colorCheck.aa('#000000', {r:0, g:0, b: 0}) // returns true
For other methods, see the docs
Good accessibility means good UX for everyone!
Enjoy!
MIT License
FAQs
Color Check is a very tine library for checking your foreground and backgorunds colors against the WCAG2 color compliance standard.
The npm package color-check receives a total of 1,431 weekly downloads. As such, color-check popularity was classified as popular.
We found that color-check demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
Security News
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.