New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

allyfe

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

allyfe

Lightweight color conversion library that converts color codes to accessible alternatives

  • 0.1.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-85.71%
Maintainers
1
Weekly downloads
 
Created
Source

allyfe

🌈 Lightweight color conversion library that converts color codes to accessible alternatives

I'm aspiring to make open-source my full-time work. If you like the work that I do, please consider supporting me.

Coffee PayPal

Install

npm i allyfe

Usage

Turn a valid color code into an accessible alternative using color-blindness filters. For example, red to a person with deuteranopia would look something like #0000B3.

Module

const { AllyFe, Filter } = require ( 'allyfe' );

AllyFe( Filter.deuteranopia, 'red' );                 // Returns #9FB300
AllyFe( Filter.deuteranopia, '#ff0000' ))             // Returns #9FB300
AllyFe( Filter.tritanomaly, 'red' );                  // Returns #F70000
AllyFe( Filter.tritanomaly, 'hsl( 0, 100%, 50% )' )   // Returns #F70000
AllyFe( Filter.protanopia, 'rgb( 255,0,0,1 )' )       // Returns #918E00
...
Supported Filters
deuteranopia
deuteranomaly
protanopia
protanomaly
tritanopiat
tritanomaly
achromatopsia
achromatomaly

Test

npm test

Contribute

Don't be scared raise an issue or a pull request! Any contributions, no matter how big or small will land your picture here.

Keywords

FAQs

Package last updated on 27 Feb 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc