Determines a contrasting text color (black or white) based on background luminance.
The background color in hex format.
'#000000' (black) or '#FFFFFF' (white).
const textColor = getContrastingTextColor('#FF0000'); // Returns '#FFFFFF' Copy
const textColor = getContrastingTextColor('#FF0000'); // Returns '#FFFFFF'
Determines a contrasting text color (black or white) based on background luminance.