Update theme.md
[rainbowstream.git] / rainbowstream / draw.py
index d25a3c9e26123340eae79e9ef28ce0994808ed41..2fbe51de6336ecbf36ce2375d47ee9dd0142549d 100644 (file)
@@ -25,12 +25,19 @@ def init_cycle():
     """
     colors_shuffle = [globals()[i.encode('utf8')]
         if not i.startswith('term_')
-        else term_color(int(i[4:]))
+        else term_color(int(i[5:]))
         for i in c['CYCLE_COLOR']]
     return itertools.cycle(colors_shuffle)
 g['cyc'] = init_cycle()
 
 
+def notify_cycle():
+    """
+    Notify from rainbow
+    """
+    g['cyc'] = init_cycle()
+
+
 def order_rainbow(s):
     """
     Print a string with ordered color with each character
@@ -109,8 +116,8 @@ def color_func(func_name):
     Call color function base on name
     """
     pure = func_name.encode('utf8')
-    if pure.startswith('term_') and pure[4:].isdigit():
-        return term_color(int(pure[4:]))
+    if pure.startswith('term_') and pure[5:].isdigit():
+        return term_color(int(pure[5:]))
     return globals()[pure]