scottcorgan

scottcorgan/contrast

Determine if the given hex color is light or dark. Helpful to determining foreground color against a background color.

JavaScript
58
5
MIT License

contrast is a utility library for determining if a given hex color is light or dark, making it useful for dynamically setting foreground colors against a background color. It is designed for developers working on web applications or UI components that require automatic color contrast adjustments. The library is simple to use and can be easily integrated into projects via npm.

Total donated
Undistributed
Share with your subscribers: