protected function setColor(int $color, bool $background = null): void
    {
        if (null !== $background) {
            $this->background = $color;

            return;
        }

        $this->foreground = $color;
    }
protected function setColor(int $color, bool $background = null): void
    {
        if (null !== $background) {
            $this->background = $color;

            return;
        }

        $this->foreground = $color;
    }
protected function setColor ( int $ color , bool $ background = null ) : void { if ( null !== $ background ) { $ this -> background = $ color ; return ; } $ this -> foreground = $ color ; }
Set a color.

@param int  $color      The color
@param bool $background [optional] Whether this is to set the background

@return void
Set a color .