A11ycolor
🌈 Generate the nearest accessible color
Install / Use
/learn @alex-page/A11ycolorREADME
🌈 A11yColor
Generate the nearest accessible color.
Install
$ npm install a11ycolor
Usage
const a11yColor = require('a11ycolor');
a11yColor(red, blue); // This returns #FFA3A3
Parameters
The function a11yColor function takes three parameters:
a11yColor($toMakeA11y, $background, ($ratioKey = 'small'));
toMakeA11y- The color that is to be made accessible on the backgroundbackground- The background color to for the contrastratioKey- The keyword 'small' ( 4.5 ) or 'large' ( 3.0 ) for the WCAG 2.1 contrast ratio
Release History
- v2.0.9 - Update GitHub action to use yml syntax
- v2.0.8 - Update dependencies
- v2.0.7 - Update dependencies
- v2.0.6 - Replace
eslintwithxo, adjust formatting - v2.0.5 - Use files instead of
.npmignore - v2.0.4 - Remove
prepublishOnlyscript - v2.0.3 - Remove travis badge from README.md
- v2.0.2 - Replace travis with GitHub actions
- v2.0.1 - Updating readme, fixing bug when white and black passes
- v2.0.0 - Binary search, removing steps, adding eslint
- v1.1.0 - Fixing bugs that caused the contrast to be off by 0.2
- v1.0.7 - Adding travis
- v1.0.6 - Minimizing the files
- v1.0.5 - Removing babel
- v1.0.4 - Updating documentation
- v1.0.3 - Making import work
- v1.0.2 - Removing unecessary NPM packages
- v1.0.1 - Adding readme
- v1.0.0 - First release
Related Skills
node-connect
332.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
81.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
332.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
81.7kCommit, push, and open a PR
