Ques/Help explanation of color multipliers

B

briansol

Guest
default avatars do not meet ADA contrast ratios in many color combinations.

can someone help me decipher these multipliers?

where does 12.92 come from? .7152 ?

Code:

Code:
public static function getRelativeLuminance($r, $g = null, $b = null)
    {
        if (is_array($r))
        {
            $b = $r[2];
            $g = $r[1];
            $r = $r[0];
        }

        $scaler = function($color)
        {
            $color /= 255;
            if ($color <= 0.03928)
            {...

Read more

Continue reading...