Skip to content

Instantly share code, notes, and snippets.

View atomiomi's full-sized avatar
🏠
Working from home

Abylay atomiomi

🏠
Working from home
View GitHub Profile
/**
* Calculate the contrast of a color to determine the appropriate opposing text color.
* @author D. Condrey
* @param {string|object} - element background-color or element
* @return {string}
* white - if background is a dark shade color
* black - if background is a light shade color
*/
define(function() {