russoedu / font-color-contrast Goto Github PK
View Code? Open in Web Editor NEWApplication to use black or white font according to the given background color
Home Page: https://russoedu.github.io/font-color-contrast-demo/
License: MIT License
Application to use black or white font according to the given background color
Home Page: https://russoedu.github.io/font-color-contrast-demo/
License: MIT License
If the input string is rgb, then filter it through a lib like https://www.npmjs.com/package/rgb-hex before computing the font color.
This way clients can assume any valid CSS color string is also a valid input to this lib and clients can avoid having logic in their own code which checks the color string's contents.
Sorry to bother, is a stupid question the project work with RGBA Hex color too (.e.g. #ead8814b)?
I am currently on version ^1.1.1
in a typescript project. After updating the version to 10.0.0
in my package.json file and then running yarn install
I get the following error:
error /node_modules/font-color-contrast: Command failed.
Exit code: 127
Command: tsc
Arguments:
Directory: /node_modules/font-color-contrast
Output:
I have enjoyed this library so far and look forward to updating to the new version! Let me know if there is any more information that I can provide to help diagnose the issue, thank you!
Hello there!
Where is this threshold value coming from? I mean, why 130
?
Would you accept a PR to receive that value as an optional parameter?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.