# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1396903047 18000
#      Mon Apr 07 15:37:27 2014 -0500
# Node ID a8db48e997b57c64aa646ec2762e37bbc7a17482
# Parent  05086b56b56406962d26719bc9689a60e7f2e0f3
color: fallback and test label as an effect

With this changeset, we can now send a color name directly to the label
function, e.g.

$ hg log -r . -T "{label('red', node|short)}\n"

diff --git a/hgext/color.py b/hgext/color.py
--- a/hgext/color.py
+++ b/hgext/color.py
@@ -382,6 +382,8 @@
             s = _styles.get(l, '')
             if s:
                 effects.append(s)
+            elif valideffect(l):
+                effects.append(l)
         effects = ' '.join(effects)
         if effects:
             return '\n'.join([render_effects(s, effects)