Feb-22-2022, 04:32 AM
(This post was last modified: Feb-22-2022, 04:32 AM by deanhystad.)
Well, "ne" is not a hexadecimal number.
Error:decim = int(d1, 16)
ValueError: invalid literal for int() with base 16: 'ne'
I can duplicate the error:import re def allcolors(): colors = ("neAABB",) for c in colors: background = c split_strings = re.findall('..' ,background) print(split_strings) d1 = split_strings[0] # get the first item of the list, to convert it to decimal print(d1) decim = int(d1, 16) print('Value in hexadecimal:', d1) print('Value in decimal:', decim) allcolors()
Error: decim = int(d1, 16)
ValueError: invalid literal for int() with base 16: 'ne'
Now you just need to figure where 'ne' is coming from. My guess is there is something in BLColor that is not a color. The code stopped working you started processing all the colors instead of just the last one.