/**
* Set Hr element text color style.
*
* @param string $color Hr element text color style.
*
* @return self Returns instance of the Hr element class.
*
* @access public
*/
public function color(string $color): self
Examples
Set named text color style using fluent interface
use function Thermage\hr;
use function Thermage\render;
// ...
render(
hr('Stay RAD!')->color('red')
);
Set hex text color style using fluent interface
use function Thermage\hr;
use function Thermage\render;
// ...
render(
hr('Stay RAD!')->color('#dc3545')
);
Set rgb text color style using fluent interface
use function Thermage\hr;
use function Thermage\render;
// ...
render(
hr('Stay RAD!')->color('rgb(220, 53, 69)')
);
Set text color style using magic method fluent interface
use function Thermage\hr;
use function Thermage\render;
// ...
render(
hr('Stay RAD!')->colorRed()
);
Set text color style using magic classes pipeline
use function Thermage\hr;
use function Thermage\render;
// ...
render(
hr('Stay RAD!', 'color-red')
);
Set text color style using shortcodes
use function Thermage\hr;
use function Thermage\render;
// ...
render(
hr('[color=red]Stay RAD![/color]')
);
Set hex text color style using shortcodes
use function Thermage\hr;
use function Thermage\render;
// ...
render(
hr('[color=#dc3545]Stay RAD![/color]')
);
Set rgb text color style using shortcodes
use function Thermage\hr;
use function Thermage\render;
// ...
render(
hr('[color="rgb(220, 53, 69)"]Stay RAD![/color]')
);
Terminal
$ php thermage.php
Stay RAD!
Getting Started
Methods
- border Set Hr element border style.
- color Set Hr element text color style.
- d Set Hr element display style.
- getShortcodes Get Hr element shortcodes instance.
- getTheme Get Hr element theme.
- getValue Get Hr element value.
- render Render Hr element.
- setShortcodes Set Hr element shortcodes instance.
- setTheme Set Hr element theme instance.
- textAlign Set Hr element text align.
- value Set Hr element value.