#at the top from colormath.color_objects import LabColor,sRGBColor from colormath.color_conversions import convert_color #as different function def lab_to_hex_converter(l,a,b): lab = LabColor(l,a,b) rgb_color = convert_color(lab,sRGBColor) return rgb_color.get_rgb_hex()