Skip to content

Commit a0a5ad8

Browse files
committed
mention hex colors
1 parent 4c0726a commit a0a5ad8

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

console/coloring.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,17 @@ It is possible to define your own styles using the
4040
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
4141

4242
// ...
43-
$outputStyle = new OutputFormatterStyle('red', 'yellow', ['bold', 'blink']);
43+
$outputStyle = new OutputFormatterStyle('#F00', 'yellow', ['bold', 'blink']);
4444
$output->getFormatter()->setStyle('fire', $outputStyle);
4545

4646
$output->writeln('<fire>foo</>');
4747

48-
Available foreground and background colors are: ``black``, ``red``, ``green``,
49-
``yellow``, ``blue``, ``magenta``, ``cyan`` and ``white``.
48+
Any hex color is supported for foreground and background colors. Besides that, these named colors are supported:
49+
``black``, ``red``, ``green``, ``yellow``, ``blue``, ``magenta``, ``cyan`` and ``white``.
50+
51+
.. note::
52+
53+
If the terminal doesn't support true colors, the nearest named color is used.
5054

5155
And available options are: ``bold``, ``underscore``, ``blink``, ``reverse``
5256
(enables the "reverse video" mode where the background and foreground colors

0 commit comments

Comments
 (0)