
TEXTColor is a JavaScript library that selects the proper text color based on the background color to contrast text against backgrounds.
How to use it:
1. Install and import the TEXTColor library.
# NPM $ npm install textcolor --save
import TEXTColor from 'textcolor-js'
2. Or load the umd version from a CDN.
<script src="https://cdn.jsdelivr.net/npm/textcolor@latest/textcolor.min.js"></script>
3. Find the proper color (for text) from a background color you provide.
let bgColor = '#000000'; let textcolor = TEXTColor.findTextColor(bgColor); console.log(textcolor); // #fff






