Returns a contrasting color from the provided options based on the luminosity of the input color.
The color to be evaluated.
The color to return if the original color is dark.
The color to return if the original color is light.
const contrastColor = adjustForLuminosity("#000000", "#ffffff", "#000000");console.log(contrastColor); // "#ffffff" Copy
const contrastColor = adjustForLuminosity("#000000", "#ffffff", "#000000");console.log(contrastColor); // "#ffffff"
Returns a contrasting color from the provided options based on the luminosity of the input color.