src/ConsoleColor.php
public function color256($code, $option = self::COLORS_256_FOREGROUND)
    {
        if (!$this->isSupportedColors256()) {
            throw new InvalidArgumentException('No supported colors 256.');
        }

        $attrs = [$option, 5, $code];
        $this->mergeToCurrent($attrs);

        return $this;
    }
public function color256($code, $option = self::COLORS_256_FOREGROUND)
    {
        if (!$this->isSupportedColors256()) {
            throw new InvalidArgumentException('No supported colors 256.');
        }

        $attrs = [$option, 5, $code];
        $this->mergeToCurrent($attrs);

        return $this;
    }
public function color256 ( $ code , $ option = self :: COLORS_256_FOREGROUND ) { if ( ! $ this -> isSupportedColors256 ( ) ) { throw new InvalidArgumentException ( 'No supported colors 256.' ) ; } $ attrs = [ $ option , 5 , $ code ] ; $ this -> mergeToCurrent ( $ attrs ) ; return $ this ; }
@param int $code
@param int $option

@throws InvalidArgumentException

@return $this
@param int $code @param int $option