Skip to content

Commit 804f2f2

Browse files
wouterjweaverryan
authored andcommitted
Added information about coloring with tags
1 parent 0b46ff5 commit 804f2f2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

components/console/introduction.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,18 @@ Available foreground and background colors are: ``black``, ``red``, ``green``,
138138

139139
And available options are: ``bold``, ``underscore``, ``blink``, ``reverse`` and ``conceal``.
140140

141+
You can also set these colors and options inside the tagname::
142+
143+
// green text
144+
$output->writeln('<fg=green>foo</fg=green>');
145+
146+
// black text on a cyan background
147+
$output->writeln('<fg=black;bg=cyan>foo</fg=black;bg=cyan>');
148+
149+
// bold text on a yellow background
150+
$output->writeln('<bg=yellow;options=bold>foo</bg=yellow;options=bold>');
151+
152+
141153
Using Command Arguments
142154
-----------------------
143155

0 commit comments

Comments
 (0)