public function setTextColor($color) {

        // if it is null, just remember null
        if (is_null($color)) {

            // undefined
            $this->textColor = null;

        // it is an instance of Color
        } elseif ($color instanceof Color) {

            // clone it
            $this->textColor = clone $color;

        // it is some other type    
        } else {

            // let the Color object sort it out
            $this->textColor = new Color($color);

        }

        // chaining
        return $this;

    }
public function setTextColor($color) {

        // if it is null, just remember null
        if (is_null($color)) {

            // undefined
            $this->textColor = null;

        // it is an instance of Color
        } elseif ($color instanceof Color) {

            // clone it
            $this->textColor = clone $color;

        // it is some other type    
        } else {

            // let the Color object sort it out
            $this->textColor = new Color($color);

        }

        // chaining
        return $this;

    }
public function setTextColor ( $ color ) { // if it is null, just remember null if ( is_null ( $ color ) ) { // undefined $ this -> textColor = null ; // it is an instance of Color } elseif ( $ color instanceof Color ) { // clone it $ this -> textColor = clone $ color ; // it is some other type     } else { // let the Color object sort it out $ this -> textColor = new Color ( $ color ) ; } // chaining return $ this ; }
Set the text color

@param Color | string | int | array $color
- Color - a Color object
- String - a W3C color index name "darkblue"
- integer - a number between 0-255 for the XTerm escape code
- array - RGB values in the format [R,G,B]
@return $this
Set the text color