Contrast.js is a tiny library with no dependencies that dynamically updates the contrast of given text based on its background image. Never worry about your color matching the background image again! No more countless media queries.
Use on npm, look at this fork or their original work