/**
 * Set Paragraph element text color style.
 *
 * @param string $color Paragraph element text color style.
 *
 * @return self Returns instance of the Paragraph element class.
 *
 * @access public
 */
public function color(string $color): self

Examples

Set named text color style using fluent interface

use function Thermage\paragraph;
use function Thermage\render;

// ...

render( 
  paragraph('Stay RAD!')->color('red')
);

Set hex text color style using fluent interface

use function Thermage\paragraph;
use function Thermage\render;

// ...

render( 
  paragraph('Stay RAD!')->color('#dc3545')
);

Set rgb text color style using fluent interface

use function Thermage\paragraph;
use function Thermage\render;

// ...

render( 
  paragraph('Stay RAD!')->color('rgb(220, 53, 69)')
);

Set text color style using magic method fluent interface

use function Thermage\paragraph;
use function Thermage\render;

// ...

render( 
  paragraph('Stay RAD!')->colorRed()
);

Set text color style using magic classes pipeline

use function Thermage\paragraph;
use function Thermage\render;

// ...

render( 
  paragraph('Stay RAD!', 'color-red')
);

Set text color style using shortcodes

use function Thermage\paragraph;
use function Thermage\render;

// ...

render( 
  paragraph('[color=red]Stay RAD![/color]')
);

Set hex text color style using shortcodes

use function Thermage\paragraph;
use function Thermage\render;

// ...

render( 
  paragraph('[color=#dc3545]Stay RAD![/color]')
);

Set rgb text color style using shortcodes

use function Thermage\paragraph;
use function Thermage\render;

// ...

render( 
  paragraph('[color="rgb(220, 53, 69)"]Stay RAD![/color]')
);
Terminal
$ php thermage.php
Stay RAD!

Getting Started

Methods