Index: simplestyle.py =================================================================== --- simplestyle.py (revision 20207) +++ simplestyle.py (working copy) @@ -205,10 +205,15 @@ return tuple(converted_numbers) else: return (0,0,0) - - r=int(c[1:3],16) - g=int(c[3:5],16) - b=int(c[5:],16) + try: + r=int(c[1:3],16) + g=int(c[3:5],16) + b=int(c[5:],16) + except: + # unknown color ... + # Return a default color. Maybe not the best thing to do but probably + # better than raising an exception. + return(0,0,0) return (r,g,b) def formatColoria(a): """int array to #rrggbb"""