JBZoo\Image\Text::_getColor PHP Method

_getColor() protected static method

Determine text color
protected static _getColor ( mixed $image, string | array $colors ) : array
$image mixed GD resource
$colors string | array
return array
    protected static function _getColor($image, $colors)
    {
        $colors = (array) $colors;
        $result = array();
        foreach ($colors as $color) {
            $rgba = Helper::normalizeColor($color);
            $result[] = imagecolorallocatealpha($image, $rgba[0], $rgba[1], $rgba[2], $rgba[3]);
        }
        return $result;
    }