Greasy Fork is available in English.
library to determine if the color parameter is a 'light' or a 'dark' color
Este script no debería instalarse directamente. Es una biblioteca que utilizan otros scripts mediante la meta-directiva de inclusión // @require https://update.greasyfork.org/scripts/491888/1827644/Light%20or%20Dark.js
Call the function lightOrDark() with the color you want to test.
Returns string "light" or "dark" accordingly.
For example:
const bgLightOrDark = lightOrDark(window.getComputedStyle(document.body).backgroundColor);