This commit is contained in:
sankalp committed 2025-02-13 16:50:59 +05:45
1 parent 1357a9c5fd
commit 76d1992a55
4 files changed
-49

No files matched your search

-29
View File
@@ -262,28 +262,6 @@ def generate_templates(
with open(new_path, "w") as f:
f.write(template)
for file in ready_templates:
_template = ""
for color in vars(MaterialDynamicColors).keys():
color_name = getattr(MaterialDynamicColors, color)
if hasattr(color_name, "get_hct"):
rgba = color_name.get_hct(scheme).to_rgba()
hex_color = rgb_to_hex(rgba)
rgb_color = rgba_to_rgb(rgba)
new_line = ready_templates[file].format(
name=color, hex=hex_color, rgb=rgb_color
)
_template += new_line
if color in additional:
new_line = ready_templates[file].format(
name=additional[color], hex=hex_color, rgb=rgb_color
)
_template += new_line
new_path = join(output_folder, os.path.basename(file))
with open(new_path, "w") as f:
f.write(_template)
def run_hooks(folder: str):
if not os.path.exists(folder):
@@ -365,13 +343,6 @@ def main(
generate_templates(
f"{script_dir}/templates", cache_path, scheme, color_scheme, image_path
)
generate_templates(
f"{script_dir}/templates/svg",
join(cache_path, "svg/"),
scheme,
color_scheme,
image_path,
)
if is_dark:
subprocess.run(["sh", join(script_dir, "gtk-material.sh")])