diff mercurial/color.py @ 30967:20990991d384

color: move '_effect' mapping into core This is the second things we can move into core safely.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Fri, 18 Nov 2016 18:48:38 +0100
parents b2be4ccaff1d
children 0d2a58a04080
line wrap: on
line diff
--- a/mercurial/color.py	Fri Nov 18 18:43:39 2016 +0100
+++ b/mercurial/color.py	Fri Nov 18 18:48:38 2016 +0100
@@ -7,6 +7,30 @@
 
 from __future__ import absolute_import
 
+# start and stop parameters for effects
+_effects = {'none': 0,
+            'black': 30,
+            'red': 31,
+            'green': 32,
+            'yellow': 33,
+            'blue': 34,
+            'magenta': 35,
+            'cyan': 36,
+            'white': 37,
+            'bold': 1,
+            'italic': 3,
+            'underline': 4,
+            'inverse': 7,
+            'dim': 2,
+            'black_background': 40,
+            'red_background': 41,
+            'green_background': 42,
+            'yellow_background': 43,
+            'blue_background': 44,
+            'purple_background': 45,
+            'cyan_background': 46,
+            'white_background': 47}
+
 _styles = {'grep.match': 'red bold',
            'grep.linenumber': 'green',
            'grep.rev': 'green',