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

Examples

Set named text color style using fluent interface

use function Thermage\anchor;
use function Thermage\render;

// ...

render(
  anchor('Thermage')->href('https://awilum.github.io/thermage/')->color('red')
);

Set hex text color style using fluent interface

use function Thermage\anchor;
use function Thermage\render;

// ...

render(
  anchor('Thermage')->href('https://awilum.github.io/thermage/')->color('#dc3545')
);

Set rgb text color style using fluent interface

use function Thermage\anchor;
use function Thermage\render;

// ...

render (
  anchor('Thermage')->href('https://awilum.github.io/thermage/')->color('rgb(220, 53, 69)')
);

Set text color style using magic method fluent interface

use function Thermage\anchor;
use function Thermage\render;

// ...

render(
  anchor('Thermage')->href('https://awilum.github.io/thermage/')->colorRed()
);

Set text color style using magic classes pipeline

use function Thermage\anchor;
use function Thermage\render;

// ...

render( 
  anchor('Thermage', 'color-red')->href('https://awilum.github.io/thermage/')
);

Set text color style using shortcodes

use function Thermage\anchor;
use function Thermage\render;

// ...

render(
  anchor('[color=red]Thermage[/color]')->href('https://awilum.github.io/thermage/')
);

Set hex text color style using shortcodes

use function Thermage\anchor;
use function Thermage\render;

// ...

render(
  anchor('[color=#dc3545]Thermage[/color]')->href('https://awilum.github.io/thermage/')
);

Set rgb text color style using shortcodes

use function Thermage\anchor;
use function Thermage\render;

// ...

render(
  anchor('[color="rgb(220, 53, 69)"]Thermage[/color]')->href('https://awilum.github.io/thermage/')
);
Terminal
$ php thermage.php