Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksagona committed Dec 13, 2023
1 parent 610c6b5 commit a9a3a8c
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,21 @@ Colors
------

On a console terminal that supports it, you can colorize text outputted to the console
with the ``Pop\Console\Color::colorize()`` method:
with the ``colorize()`` method:

```php
use Pop\Console\Console;
use Pop\Console\Color;

$console = new Console();
$console->write(
'Here is some ' .
$console->colorize('IMPORTANT', Color::BOLD_RED) .
' console information.'
);
```

The ``colorize()`` method is also available as a static method on the ``Pop\Console\Color`` class:

```php
use Pop\Console\Console;
Expand Down

0 comments on commit a9a3a8c

Please sign in to comment.