app/Module/FanChartModule.php
protected function imageColor($image, string $css_color): int
    {
        return imagecolorallocate(
            $image,
            (int) hexdec(substr($css_color, 0, 2)),
            (int) hexdec(substr($css_color, 2, 2)),
            (int) hexdec(substr($css_color, 4, 2))
        );
    }
protected function imageColor($image, string $css_color): int
    {
        return imagecolorallocate(
            $image,
            (int) hexdec(substr($css_color, 0, 2)),
            (int) hexdec(substr($css_color, 2, 2)),
            (int) hexdec(substr($css_color, 4, 2))
        );
    }
protected function imageColor ( $ image , string $ css_color ) : int { return imagecolorallocate ( $ image , ( int ) hexdec ( substr ( $ css_color , 0 , 2 ) ) , ( int ) hexdec ( substr ( $ css_color , 2 , 2 ) ) , ( int ) hexdec ( substr ( $ css_color , 4 , 2 ) ) ) ; }
Convert a CSS color into a GD color.

@param resource $image
@param string   $css_color

@return int
Convert a CSS color into a GD color .