src/ColorContrast.php
private function calculateYIQValue(RGB $color)
    {
        $yiq = (($color->getRed() * 299) + ($color->getGreen() * 587) + ($color->getBlue() * 114)) / 1000;
        return $yiq;
    }
private function calculateYIQValue(RGB $color)
    {
        $yiq = (($color->getRed() * 299) + ($color->getGreen() * 587) + ($color->getBlue() * 114)) / 1000;
        return $yiq;
    }
private function calculateYIQValue ( RGB $ color ) { $ yiq = ( ( $ color -> getRed ( ) * 299 ) + ( $ color -> getGreen ( ) * 587 ) + ( $ color -> getBlue ( ) * 114 ) ) / 1000 ; return $ yiq ; }
calculates the YIQ value for a given color.

@param RGB $color

@return float 0-255
calculates the YIQ value for a given color .