Returns the user defined color with defined name.

@param  string $name The user defined color name.
@return \Beluga\Drawing\ColorGD
@throws \Beluga\ArgumentError
424659
public final function getUserColor( string $name )
   {

      if ( $this->disposed )
      {
         return null;
      }

      if ( ! isset( $this->colors[ $name ] ) )
      {
         throw new ArgumentError(
            '$name',
            $name,
            'Drawing.Image',
            'There is no user color with this name defined for this image!'
         );
      }

      return $this->colors[ $name ];

   }
1129201
public function legend($name = null)
    {
        if (!is_null($name)) {
            $this->legend = $name;
        }

        return $this->legend;
    }
319824
public function name($name = null) {

        if(null !== $name && false === is_string($name) && false === is_numeric($name)) {
            return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string or number, "%s" given', __METHOD__, gettype($name)), E_USER_ERROR);
        }

        $this -> name = $name;
        $this -> attributes['name'] = $name;

        return $this;
    }
1324024
public function renderIfExists($name = null)
    {
        if (is_null($name)) {
            $params = $this->currentRoute->get();
            $name = $params[0];
        }

        if (! $this->exists($name)) {
            return '';
        }

        return $this->render($name);
    }
1038065
private function findAlias(Name $name)
    {
        $that = \strtolower($name);
        foreach ($this->aliases as $alias => $prefix) {
            if ($that === $alias) {
                return new FullyQualifiedName($prefix->toString());
            } elseif (\substr($that, 0, \strlen($alias) + 1) === $alias . '\\') {
                return new FullyQualifiedName($prefix->toString() . \substr($name, \strlen($alias)));
            }
        }
    }
1118315
public function getAlias($name)
    {
        $aliases = $this->getAliases();
        if (isset($aliases[$name])) {
            return $aliases[$name];
        }
        return null;
    }
501191
protected function getRendererService($name)
    {
        if (!isset($this->renderers[$name])) {
            throw new \RuntimeException('The renderer "%s" does not exist.');
        }

        return $this->container->get($this->renderers[$name]);
    }
1288423
public function color($name = null, $value = null) 
	{
		Argument::i()
			->test(1, 'string', 'null')
			->test(2, 'string', 'null');
			
		$field = Color::i($name);
		
		if(!is_null($name)) {
			$field->setName($name);
		}
		
		if(!is_null($value)) {
			$field->setValue($value);
		}
		
		return $field;
	}
517421
public function name($name) {

		if(false === is_string($name)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($name)), E_USER_ERROR);
		}

		$this -> name = $name;

		return $this;
	}
1098682
protected static function _vt100($name)
    {
        if (is_numeric($name)) {
            return $name;
        }

        if (isset(static::$_vt100['colors'][$name])) {
            $value = static::$_vt100['colors'][$name];
        } else {
            $value = 39;
        }
        return $value;
    }
1210209
protected function getSlugFromName($name)
    {
        if( array_key_exists($name, self::$sluggedNames) ) {
            return self::$sluggedNames[$name];
        }

        return self::$sluggedNames[$name] = trim(Str::slug($name, '-'));
    }
918589
public function name($name)
    {
        $prefix = !is_null($this->associatedEntity) && $this->associatedEntity->isSupportedAttribute($name) ?
            $this->keys['POST_WRAP'] . '[' . $this->associatedEntity->getInputName() . ']' :
            $this->keys['POST_WRAP'];

        // Transforms user[name] to data[user][name];
        if (preg_match('/^(.+?)\[(.+)?/', $name, $matches)) {
            return $prefix . '[' . $matches[1].'][' . $matches[2];
        }

        // Transforms user to data[user]
        return $prefix . '[' . $name . ']';
    }
1042156
public function style($name, $color = null, $background = null, $format = null, $allowInheritance = null) {
        $style = new ConsoleStyle($name, $color, $background, $format, $allowInheritance);
        $this->addStyle($style);

        return $style;
    }
471152
private function getFullClassName($name)
    {
        if ($name instanceof Name) {
            if ($name->isFullyQualified()) {
                return $name->toString();
            }
        }

        $name = (string)$name;

        if (isset($this->namespace->uses[$name])) {
            return $this->namespace->uses[$name];
        }

        if ($this->namespace->name) {
            return $this->namespace->name . '\\' . $name;
        }

        return $name;
    }
371082
public function getMappingName($name)
    {
        return isset($this->mapping[$name]) ? $this->mapping[$name] : $name;
    }
1323980
private function getFullQualifiedAssetName($name)
    {
        $name = $this->getUnquotedAssetName($name);

        if (strpos($name, '.') === false) {
            $name = $this->getName() . '.' . $name;
        }

        return strtolower($name);
    }
710571
public function getSchemeByName($name, $colorsOnly = false)
    {
        $select = $this->tableGateway->getSql()->select();

        if($colorsOnly) {
            $select->columns(array(
                'pscheme_id', 'pscheme_name', 'pscheme_colors', 'pscheme_is_active'
            ));
        }

        $select->where->equalTo('pscheme_name', $name);

        $resultSet = $this->tableGateway->selectWith($select);

        return $resultSet;
    }