def get_project_colors(cls): cursor = Database.find_db() # returns project colors by companies cursor.execute("SELECT main_color FROM project WHERE name IS NOT NULL ORDER BY name;") project_colors = [] for i in cursor.fetchall(): project_colors.append(list(i)) for i, j in enumerate(project_colors): project_colors[i][0] = Database.hex_to_rgb(j[0]) return project_colors
def get_project_colors(cls): cursor = Database.find_db() # returns project colors by companies cursor.execute("SELECT company_name, main_color FROM project ORDER BY company_name;") colors = cursor.fetchall() client_colors = [] for i in colors: client_colors.append(list(i)) for i, j in enumerate(client_colors): client_colors[i][1] = Database.hex_to_rgb(j[1]) return client_colors