Skip to content

Commit 9dd60cf

Browse files
[Console] Add support of RGB functional notation to output colors
1 parent 982fae4 commit 9dd60cf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

console/coloring.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ Any hex color is supported for foreground and background colors. Besides that, t
5858

5959
Support for bright colors was introduced in Symfony 5.3.
6060

61+
.. versionadded:: 5.4
62+
63+
Support for RGB functional notation was introduced in Symfony 5.4.
64+
6165
.. note::
6266

6367
If the terminal doesn't support true colors, the nearest named color is used.
@@ -77,6 +81,9 @@ You can also set these colors and options directly inside the tag name::
7781
// red text
7882
$output->writeln('<fg=#c0392b>foo</>');
7983

84+
// chartreuse text
85+
$output->writeln('<fg=rgb(127, 255, 0)>foo</>');
86+
8087
// black text on a cyan background
8188
$output->writeln('<fg=black;bg=cyan>foo</>');
8289

0 commit comments

Comments
 (0)