protected function hexToRgb($hex)
    {
        if (! isset($this->colorCache[$hex])) {
            $this->colorCache[$hex] = [
                'r' => hexdec(substr($hex, 0, 2)),
                'g' => hexdec(substr($hex, 2, 2)),
                'b' => hexdec(substr($hex, 4, 2))
            ];
        }

        return $this->colorCache[$hex];
    }
protected function hexToRgb($hex)
    {
        if (! isset($this->colorCache[$hex])) {
            $this->colorCache[$hex] = [
                'r' => hexdec(substr($hex, 0, 2)),
                'g' => hexdec(substr($hex, 2, 2)),
                'b' => hexdec(substr($hex, 4, 2))
            ];
        }

        return $this->colorCache[$hex];
    }
protected function hexToRgb ( $ hex ) { if ( ! isset ( $ this -> colorCache [ $ hex ] ) ) { $ this -> colorCache [ $ hex ] = [ 'r' => hexdec ( substr ( $ hex , 0 , 2 ) ) , 'g' => hexdec ( substr ( $ hex , 2 , 2 ) ) , 'b' => hexdec ( substr ( $ hex , 4 , 2 ) ) ] ; } return $ this -> colorCache [ $ hex ] ; }
Color converter - HEX to RGB.

@param string $hex Color.
@return array
Color converter - HEX to RGB .