Last active
November 29, 2022 11:38
-
-
Save AndyPiddock/5a178f4314b79b889e2ad6d6dd34804c to your computer and use it in GitHub Desktop.
Ensure that foreground and background color combinations provide sufficient contrast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isBright r,g,b | |
local tbrightness | |
put (r * 299 + g * 587 + b * 114) / 1000 into tbrightness | |
if tbrightness > 125 then | |
return "no" | |
else | |
return "yes" | |
end if | |
end isBright |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment