Jeremy Stretch 8 years ago
parent
commit
aa6ca21a34
1 changed files with 1 additions and 1 deletions
  1. 1 1
      netbox/utilities/utils.py

+ 1 - 1
netbox/utilities/utils.py

@@ -31,7 +31,7 @@ def foreground_color(bg_color):
     Return the ideal foreground color (black or white) for a given background color in hexadecimal RGB format.
     Return the ideal foreground color (black or white) for a given background color in hexadecimal RGB format.
     """
     """
     bg_color = bg_color.strip('#')
     bg_color = bg_color.strip('#')
-    r, g, b = [int(bg_color[c:c+2], 16) for c in (0, 2, 4)]
+    r, g, b = [int(bg_color[c:c + 2], 16) for c in (0, 2, 4)]
     if r * 0.299 + g * 0.587 + b * 0.114 > 186:
     if r * 0.299 + g * 0.587 + b * 0.114 > 186:
         return '000000'
         return '000000'
     else:
     else: