Browse files

Improved coloring output section with OutputFormatterStyle and colors…

…/options list
  • Loading branch information...
raulfraile authored and weaverryan committed Mar 13, 2012
1 parent 019302f commit bbeb39619f3d6ff3d217cccb50e051fec5c62f19
Showing with 12 additions and 0 deletions.
  1. +12 −0 components/console.rst
@@ -117,6 +117,18 @@ output. For example::
// white text on a red background
+It is possible to define your own styles using the class
+ $style = new OutputFormatterStyle('red', 'yellow', array('bold', 'blink'));
+ $output->getFormatter()->setStyle('fire', $style);
+ $output->writeln('<fire>foo</fire>');
+Available foreground and background colors are: ``black``, ``red``, ``green``,
+``yellow``, ``blue``, ``magenta``, ``cyan`` and ``white``.
+And available options are: 'bold', 'underscore', 'blink', 'reverse' and 'conceal'.
Using Command Arguments

0 comments on commit bbeb396

Please sign in to comment.