Keys →
Functions ↓
function colorContrast ( $col ) {#-k color#- given a hex background-color $col, what is best fg color to use?#-p $col - req - Hex RGB color (Must be in the form #hhhhhh)#-p - ret - contrast color, format #hhhhhh#-d 3/21/21 Added $r = (hexdec ( substr($col,1,2) )+127)%256; $g = (hexdec ( substr($col,3,2) )+127)%256; $b = (hexdec ( substr($col,5,2) )+127)%256; return shift('#'.right('0'.dechex($r),2).right('0'.dechex($g),2).right('0'.dechex($b),2)); }?>