diff --git a/schoolapps/untisconnect/api.py b/schoolapps/untisconnect/api.py index 03af442568a894bc05bb24cefa08fa9eac93b374..b1e8c01bbd1575a9dd5498509ff1f5edbf1a3c06 100755 --- a/schoolapps/untisconnect/api.py +++ b/schoolapps/untisconnect/api.py @@ -172,7 +172,9 @@ class Subject(object): self.shortcode = db_obj.name self.name = db_obj.longname self.color = db_obj.backcolor - self.hex_color = "#" + str(hex(db_obj.backcolor)).replace("0x", "") + hex_bgr = str(hex(db_obj.backcolor)).replace("0x", "") + hex_rgb = hex_bgr[4:5] + hex_bgr[2:3] + hex_bgr[0:1] + self.hex_color = "#" + hex_rgb def get_all_subjects():