Removed old color_mapping.json

This commit is contained in:
l_samenv
2024-08-21 11:34:15 +02:00
parent d3017860f8
commit a288ff0e78
2 changed files with 0 additions and 12 deletions

View File

@ -1,5 +1,3 @@
import json
def assign_colors_to_curves(blocks):
"""
Assign a color to each curve contained in the blocks
@ -14,19 +12,12 @@ def assign_colors_to_curves(blocks):
updated depending on its availability in the ColorMap, and a new "original_color" value which contains the previous "color" value
"""
color_map = json.load(open("./graphs/color_mapping.json", "r"))
# get last value only
for block in blocks:
color_set = set()
auto_curves = []
for curve in block["curves"]:
if curve["name"] in color_map:
curve["original_color"] = "?"
curve["color"] = ColorMap.to_hex(ColorMap.to_code(color_map[curve["name"]]))
continue
col = curve["color"].strip()
c = ColorMap.to_code(col)
if c < 0: