diff options
author | Erik Rose <erik@mozilla.com> | 2011-11-16 00:47:29 -0800 |
---|---|---|
committer | Erik Rose <erik@mozilla.com> | 2011-11-16 16:17:43 -0800 |
commit | 571e8afc6550b5547e41808d726d96b74c4c8893 (patch) | |
tree | 2acb87827faf7267c14b4ee4d210e82a0b68e445 /README.rst | |
parent | d08d44ce35d5a36b3683028078fe3f624caf51a5 (diff) | |
download | blessings-571e8afc6550b5547e41808d726d96b74c4c8893.tar.gz |
Make simple formatting and colors work as callable wrappers. Add crazy compound formatting.
* Replaced all those generated color methods with dynamically figured out ones.
* Changed "bg" to "on" for readability in compound use.
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -126,8 +126,8 @@ attributes:: from blessings import Terminal term = Terminal() - print term.red + term.bg_green + 'Red on green? Ick!' + term.normal - print term.bright_red + term.bg_bright_blue + 'This is even worse!' + term.normal + print term.red + term.on_green + 'Red on green? Ick!' + term.normal + print term.bright_red + term.on_bright_blue + 'This is even worse!' + term.normal The available colors are... @@ -144,7 +144,9 @@ In addition, there is a ``bright`` version of each. If your terminal does not support the bright palette, it will usually render them as black. You can set the background color instead of the foreground by prepending -``bg_``, as in ``bg_blue`` or ``bg_bright_white``. +``on_``, as in ``on_blue`` or ``on_bright_white``. + +We took what couleur did and expanded upon it. You can specify any mishmash of things; you aren't required to specify a background color if you don't want to. Parametrized Capabilities ------------------------- |