is-dark-color
is-dark-color copied to clipboard
Detects if a hex color is dark or light. It is based on the w3 documentation for color luminance: https://www.w3.org/TR/WCAG20/#relativeluminancedef .
fixes #4 This adds handling for shorthand hex codes, by copying the updated answer from the [stackoverflow answer](https://stackoverflow.com/a/5624139) Making this PR as an offering, in the hopes that a new...
I get an error in hexToRgb.js when I use a short hex code (eg. #00f instead of #0000ff). It looks like the converter can't handle short hex codes.
Instead of failing for invalid arguments e.g. `null` or `undefined`, it might be better to handle these by returning `false`