Update color lightness values to 100 in colors.json and fix RGB conversion in theme.py

Incorrect RGB values in borders was seen in #14
This commit is contained in:
Vladyslav Hroshev
2023-12-31 22:24:15 +02:00
parent 6f029365d9
commit 22126706e8
2 changed files with 4 additions and 4 deletions

View File

@@ -418,7 +418,7 @@
"dark" : {
"s" : 0,
"l" : 255,
"l" : 100,
"a" : 0.03
}
},
@@ -433,7 +433,7 @@
"dark" : {
"s" : 0,
"l" : 255,
"l" : 100,
"a" : 0.07
}
},
@@ -449,7 +449,7 @@
"dark" : {
"s" : 0,
"l" : 255,
"l" : 100,
"a" : 0.1
}
},

View File

@@ -103,7 +103,7 @@ class Theme:
alpha = self.colors["elements"][element][theme_mode]["a"]
# convert hsl to rgb and multiply every item
red, green, blue = [int(item * 256) for item in colorsys.hls_to_rgb(h, lightness, saturation)]
red, green, blue = [int(item * 255) for item in colorsys.hls_to_rgb(h, lightness, saturation)]
replaced_colors.append((element, f"rgba({red}, {green}, {blue}, {alpha})"))