Checks whether a given color is considered dark. A color is considered dark if its luminosity is less than 0.5.
Optional
The CSS color string to be evaluated.
Returns true if the color is dark, otherwise false. If no color is provided, returns false.
const isDark = isDarkColor("#000000");console.log(isDark); // true Copy
const isDark = isDarkColor("#000000");console.log(isDark); // true
Checks whether a given color is considered dark. A color is considered dark if its luminosity is less than 0.5.