From 7809083195b58662a63850e8181fcebd9cad554f Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Wed, 17 Dec 2014 00:09:15 +0100 Subject: todo: add colorization functions --- todo | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) mode change 100644 => 100755 todo diff --git a/todo b/todo old mode 100644 new mode 100755 index fbe51eb..890213b --- a/todo +++ b/todo @@ -55,6 +55,22 @@ def parse_args(args): return config +def color_bold(text): + color_string = '\x1b[1m{}\x1b[0m' + return color_string.format(text) + +def color_red(text): + color_string = '\x1b[38;2;250;050;050m{}\x1b[0m' + return color_string.format(text) + +def color_yellow(text): + color_string = '\x1b[38;2;250;150;050m{}\x1b[0m' + return color_string.format(text) + +def color_blue(text): + color_string = '\x1b[38;2;050;150;250m{}\x1b[0m' + return color_string.format(text) + def main(): arguments = docopt(__doc__, version='todo 0.0.1.alpha') config = parse_args(arguments) -- cgit v1.2.3-54-g00ecf