🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

a11y-color

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

a11y-color

Color evaluation and manipulation tools

0.0.8
latest
Version published
Weekly downloads
0
Maintainers
3
Weekly downloads
 
Created

Build Status

Accessibility Color Tools (a11y-color)

Utilities

Color Parsing

parseColor: Parses a color string in rgb or rgba format into a Color object.

Color suggestions for specific contrast ratios

suggestedColors: Suggests alternative color suggestions to meet a given contrast ratio.

Contrast ratio calculation

calculateContrastRatio: Calculate the contrast ratio between the two given colors. Returns the ratio to 1, for example for two two colors with a contrast ratio of 21:1, this function will return 21.

Flatten colors

flattenColors: Combine the two given colors according to alpha blending.

FAQs

Package last updated on 23 May 2017

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