diff --git a/README.md b/README.md
index 9a8ae03..f1628d1 100644
--- a/README.md
+++ b/README.md
@@ -30,7 +30,6 @@ Design - A list of Parts that make up a final output
*(this will likely have changed by the time you are reading this)*
-- `blobfox.tar.gz` is the tar archive of the original set of blobfox emojis; run `mkdir original && tar -xf blobfox.tar.gz -C original` to uncompress the archive
- `custom/` contains PNG versions of variants based on the above archive that haven't been vectorized yet
- `vector/` contains vectorized versions of the blobfoxes (not necessary limited to the original blobfoxes)
diff --git a/assets/colors/arcticfox.toml b/assets/colors/arcticfox.toml
new file mode 100644
index 0000000..78e7bed
--- /dev/null
+++ b/assets/colors/arcticfox.toml
@@ -0,0 +1,6 @@
+body_color = "eef2f4"
+ear_color = "8599ad"
+ear_fluff_color = "a0c7de"
+sheen_color = "bfdef4"
+hand_stroke_color = "8599ad"
+face_details = "313131"
\ No newline at end of file
diff --git a/assets/colors/arcticfox.yaml b/assets/colors/arcticfox.yaml
deleted file mode 100644
index 4fa022c..0000000
--- a/assets/colors/arcticfox.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-body_color: "eef2f4"
-ear_color: "8599ad"
-ear_fluff_color: "a0c7de"
-hand_color: "eef2f4"
-tail_color: "eef2f4"
-marks_color: "eee64e"
-sheen_color: "bfdef4"
-hand_stroke_color: "8599ad"
\ No newline at end of file
diff --git a/assets/colors/base.toml b/assets/colors/base.toml
new file mode 100644
index 0000000..7954259
--- /dev/null
+++ b/assets/colors/base.toml
@@ -0,0 +1,8 @@
+body_color = "BODYCOLOR"
+ear_color = "EARCOLOR"
+ear_fluff_color = "EARFLUFF"
+sheen_color = "SHEENCOLOR"
+hand_stroke_color = "HANDSTROKE"
+face_details = "FACEDETAILS"
+cup_liquid = "CUPLIQUID"
+heart_color = "HEARTFILL"
\ No newline at end of file
diff --git a/assets/colors/cat.toml b/assets/colors/cat.toml
new file mode 100644
index 0000000..0241816
--- /dev/null
+++ b/assets/colors/cat.toml
@@ -0,0 +1,6 @@
+body_color = "fcc21b"
+ear_color = "e9ae20"
+ear_fluff_color = "8a6135"
+sheen_color = "fcc21b"
+hand_stroke_color = "313131"
+face_details = "313131"
\ No newline at end of file
diff --git a/assets/colors/cat.yaml b/assets/colors/cat.yaml
deleted file mode 100644
index ce17c47..0000000
--- a/assets/colors/cat.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
-body_color: "fcc21b"
-ear_color: "e9ae20"
-ear_fluff_color: "8a6135"
-hand_color: "fcc21b"
-tail_color: "fcc21b"
\ No newline at end of file
diff --git a/assets/colors/fox.toml b/assets/colors/fox.toml
new file mode 100644
index 0000000..d5e444f
--- /dev/null
+++ b/assets/colors/fox.toml
@@ -0,0 +1,6 @@
+body_color = "ff8702"
+ear_color = "313131"
+ear_fluff_color = "ebdccc"
+hand_stroke_color = "313131"
+sheen_color = "ff8702"
+face_details = "313131"
\ No newline at end of file
diff --git a/assets/colors/fox.yaml b/assets/colors/fox.yaml
deleted file mode 100644
index fcf38ad..0000000
--- a/assets/colors/fox.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-body_color: "ff8702"
-ear_color: "313131"
-ear_fluff_color: "ebdccc"
-hand_color: "ff8702"
-hand_stroke_color: "313131"
-tail_color: "ff8702"
diff --git a/assets/eyes/left/aww.svg b/assets/eyes/left/aww.svg
index 4ebf826..ae565bb 100644
--- a/assets/eyes/left/aww.svg
+++ b/assets/eyes/left/aww.svg
@@ -1,4 +1,4 @@
diff --git a/assets/eyes/left/base.svg b/assets/eyes/left/base.svg
index 4ae8a46..43beb1e 100644
--- a/assets/eyes/left/base.svg
+++ b/assets/eyes/left/base.svg
@@ -1,3 +1,3 @@
diff --git a/assets/fur/arcticfox/base.svg b/assets/fur/arcticfox/base.svg
deleted file mode 100644
index 2645995..0000000
--- a/assets/fur/arcticfox/base.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-
diff --git a/assets/fur/arcticfox/snug.svg b/assets/fur/arcticfox/snug.svg
deleted file mode 100644
index ab28cf8..0000000
--- a/assets/fur/arcticfox/snug.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
diff --git a/assets/fur/cat/base.svg b/assets/fur/cat/base.svg
index d7291ee..106989c 100644
--- a/assets/fur/cat/base.svg
+++ b/assets/fur/cat/base.svg
@@ -1,9 +1,9 @@
diff --git a/assets/fur/cat/pat.svg b/assets/fur/cat/pat.svg
new file mode 100644
index 0000000..286bbe1
--- /dev/null
+++ b/assets/fur/cat/pat.svg
@@ -0,0 +1,14 @@
+
diff --git a/assets/fur/fox/base.svg b/assets/fur/fox/base.svg
index 4c3d44e..864c690 100644
--- a/assets/fur/fox/base.svg
+++ b/assets/fur/fox/base.svg
@@ -1,9 +1,10 @@
diff --git a/assets/fur/fox/pat.svg b/assets/fur/fox/pat.svg
new file mode 100644
index 0000000..4afe57e
--- /dev/null
+++ b/assets/fur/fox/pat.svg
@@ -0,0 +1,17 @@
+
diff --git a/assets/fur/fox/snug.svg b/assets/fur/fox/snug.svg
index 2af1a63..2dc34ef 100644
--- a/assets/fur/fox/snug.svg
+++ b/assets/fur/fox/snug.svg
@@ -1,10 +1,11 @@
diff --git a/assets/hand/arcticfox/big_right.svg b/assets/hand/arcticfox/big_right.svg
deleted file mode 100644
index 2047658..0000000
--- a/assets/hand/arcticfox/big_right.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/assets/hand/arcticfox/left.svg b/assets/hand/arcticfox/left.svg
deleted file mode 100644
index a5d1c64..0000000
--- a/assets/hand/arcticfox/left.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/assets/hand/arcticfox/right.svg b/assets/hand/arcticfox/right.svg
deleted file mode 100644
index d58b553..0000000
--- a/assets/hand/arcticfox/right.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/assets/hand/arcticfox/big_left.svg b/assets/hand/big_left.svg
similarity index 57%
rename from assets/hand/arcticfox/big_left.svg
rename to assets/hand/big_left.svg
index c227f7f..08987c8 100644
--- a/assets/hand/arcticfox/big_left.svg
+++ b/assets/hand/big_left.svg
@@ -1,3 +1,3 @@
diff --git a/assets/hand/big_right.svg b/assets/hand/big_right.svg
new file mode 100644
index 0000000..e19341d
--- /dev/null
+++ b/assets/hand/big_right.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/hand/cat/big_left.svg b/assets/hand/cat/big_left.svg
deleted file mode 100644
index 5793d85..0000000
--- a/assets/hand/cat/big_left.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/assets/hand/cat/big_right.svg b/assets/hand/cat/big_right.svg
deleted file mode 100644
index c8d5c60..0000000
--- a/assets/hand/cat/big_right.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/assets/hand/cat/right.svg b/assets/hand/cat/right.svg
deleted file mode 100644
index de0c716..0000000
--- a/assets/hand/cat/right.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/assets/hand/fox/big_left.svg b/assets/hand/fox/big_left.svg
deleted file mode 100644
index eabd2c5..0000000
--- a/assets/hand/fox/big_left.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/assets/hand/fox/big_right.svg b/assets/hand/fox/big_right.svg
deleted file mode 100644
index 50dd0c4..0000000
--- a/assets/hand/fox/big_right.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/assets/hand/fox/left.svg b/assets/hand/fox/left.svg
deleted file mode 100644
index 19363d3..0000000
--- a/assets/hand/fox/left.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/assets/hand/fox/right.svg b/assets/hand/fox/right.svg
deleted file mode 100644
index b8171d1..0000000
--- a/assets/hand/fox/right.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/assets/hand/cat/left.svg b/assets/hand/left.svg
similarity index 60%
rename from assets/hand/cat/left.svg
rename to assets/hand/left.svg
index d7547da..8db6a5d 100644
--- a/assets/hand/cat/left.svg
+++ b/assets/hand/left.svg
@@ -1,3 +1,3 @@
diff --git a/assets/hand/right.svg b/assets/hand/right.svg
new file mode 100644
index 0000000..20f9455
--- /dev/null
+++ b/assets/hand/right.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/hand/right_lower.toml b/assets/hand/right_lower.toml
new file mode 100644
index 0000000..ac54b6d
--- /dev/null
+++ b/assets/hand/right_lower.toml
@@ -0,0 +1,4 @@
+file = "hand/right.svg"
+scale = 1
+rotate = 0
+translate = [0, 2]
diff --git a/assets/hand/wow_left.svg b/assets/hand/wow_left.svg
new file mode 100644
index 0000000..8c36a8d
--- /dev/null
+++ b/assets/hand/wow_left.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/assets/hand/wow_right.svg b/assets/hand/wow_right.svg
new file mode 100644
index 0000000..6229b82
--- /dev/null
+++ b/assets/hand/wow_right.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/assets/holding/cup_liquid/coffee.svg b/assets/holding/cup_liquid/coffee.svg
deleted file mode 100644
index 6eac667..0000000
--- a/assets/holding/cup_liquid/coffee.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/assets/holding/cup_liquid/coffee_color.toml b/assets/holding/cup_liquid/coffee_color.toml
new file mode 100644
index 0000000..cc5e2a1
--- /dev/null
+++ b/assets/holding/cup_liquid/coffee_color.toml
@@ -0,0 +1 @@
+cup_liquid = "28160b"
\ No newline at end of file
diff --git a/assets/holding/cup_liquid/hot_coco.svg b/assets/holding/cup_liquid/hot_coco.svg
deleted file mode 100644
index 39f5408..0000000
--- a/assets/holding/cup_liquid/hot_coco.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/assets/holding/cup_liquid/hot_coco_color.toml b/assets/holding/cup_liquid/hot_coco_color.toml
new file mode 100644
index 0000000..3cfe150
--- /dev/null
+++ b/assets/holding/cup_liquid/hot_coco_color.toml
@@ -0,0 +1 @@
+cup_liquid = "62422d"
\ No newline at end of file
diff --git a/assets/holding/cup_liquid/liquid.svg b/assets/holding/cup_liquid/liquid.svg
new file mode 100644
index 0000000..ce17f80
--- /dev/null
+++ b/assets/holding/cup_liquid/liquid.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/holding/cup_lower.toml b/assets/holding/cup_lower.toml
new file mode 100644
index 0000000..ad74c1f
--- /dev/null
+++ b/assets/holding/cup_lower.toml
@@ -0,0 +1,4 @@
+file = "holding/cup.svg"
+scale = 1
+rotate = 0
+translate = [0, 5]
diff --git a/assets/holding/hearts/colors/blue.toml b/assets/holding/hearts/colors/blue.toml
new file mode 100644
index 0000000..769e1ea
--- /dev/null
+++ b/assets/holding/hearts/colors/blue.toml
@@ -0,0 +1 @@
+heart_color = "5ec9db"
\ No newline at end of file
diff --git a/assets/holding/hearts/colors/red.toml b/assets/holding/hearts/colors/red.toml
new file mode 100644
index 0000000..71ceacb
--- /dev/null
+++ b/assets/holding/hearts/colors/red.toml
@@ -0,0 +1 @@
+heart_color = "e40809"
\ No newline at end of file
diff --git a/assets/holding/hearts/blue.svg b/assets/holding/hearts/heart.svg
similarity index 53%
rename from assets/holding/hearts/blue.svg
rename to assets/holding/hearts/heart.svg
index d3d03e1..6561a2e 100644
--- a/assets/holding/hearts/blue.svg
+++ b/assets/holding/hearts/heart.svg
@@ -1,4 +1,4 @@
diff --git a/assets/holding/hearts/red.svg b/assets/holding/hearts/red.svg
deleted file mode 100644
index a1eb1bd..0000000
--- a/assets/holding/hearts/red.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
diff --git a/assets/nose/no_outline.svg b/assets/nose/no_outline.svg
new file mode 100644
index 0000000..f97e47d
--- /dev/null
+++ b/assets/nose/no_outline.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/overlay/blush_pat.toml b/assets/overlay/blush_pat.toml
new file mode 100644
index 0000000..f767afa
--- /dev/null
+++ b/assets/overlay/blush_pat.toml
@@ -0,0 +1,4 @@
+file = "overlay/blush.svg"
+scale = 0.87
+rotate = -9
+translate = [-8, 10]
diff --git a/assets/overlay/more_blush.svg b/assets/overlay/more_blush.svg
new file mode 100644
index 0000000..68d7db7
--- /dev/null
+++ b/assets/overlay/more_blush.svg
@@ -0,0 +1,16 @@
+
diff --git a/definitions.toml b/definitions.toml
index 95e4a69..28c0eb8 100644
--- a/definitions.toml
+++ b/definitions.toml
@@ -1,16 +1,34 @@
-coffee_cup = ["overlay/steam.svg","holding/cup.svg","holding/cup_liquid/coffee.svg"]
-hot_coco_cup = ["overlay/steam.svg","holding/cup.svg","holding/cup_liquid/hot_coco.svg"]
-arctic_hand_right = ["hand/arcticfox/right.svg"]
-arctic_fur = ["fur/arcticfox/base.svg"]
+cup_empty = ["holding/cup_lower.toml", "hand/right_lower.toml"]
+cup_coffee = ["overlay/steam.svg","holding/cup.svg","holding/cup_liquid/liquid.svg", "holding/cup_liquid/coffee_color.toml", "hand/right.svg"]
+cup_hot_coco = ["overlay/steam.svg","holding/cup.svg","holding/cup_liquid/liquid.svg", "holding/cup_liquid/hot_coco_color.toml", "hand/right.svg"]
+knife = ["holding/knife.svg"]
+arctic = ["colors/arcticfox.toml"]
+fox_color = ["colors/fox.toml"]
fox_fur = ["fur/fox/base.svg"]
-cat_fur = ["fur/cat/base.svg"]
-fox_base = ["eyes/left/base.svg", "eyes/right/base.svg", "nose/base.svg", "mouth/w_mouth.svg"]
-fox_blush = ["eyes/left/squint.svg", "eyes/right/squint.svg", "nose/squint.svg", "mouth/downturned.svg", "overlay/blush.svg"]
-fox_happy = ["eyes/left/happy.svg", "eyes/right/happy.svg", "nose/happy.svg", "mouth/w_mouth.svg"]
-fox_upset = ["eyes/left/squint.svg", "eyes/right/squint.svg", "nose/squint.svg", "mouth/upset.svg"]
-cat_base = ["eyes/left/base.svg", "eyes/right/base.svg", "mouth/cat/w_mouth.svg"]
-fox_aww = ["eyes/left/aww.svg", "eyes/right/aww.svg", "nose/aww.svg", "mouth/w_mouth.svg", "overlay/blush.svg"]
-arctic_hold_heart = ["hand/arcticfox/big_right.svg", "hand/arcticfox/big_left.svg"]
+fox_pat = ["fur/fox/pat.svg"]
+fox_snug = ["fur/fox/snug.svg"]
+face_base = ["eyes/left/base.svg", "eyes/right/base.svg", "nose/base.svg", "mouth/w_mouth.svg"]
+blush = ["eyes/left/squint.svg", "eyes/right/squint.svg", "nose/base.svg", "mouth/downturned.svg", "overlay/blush.svg"]
+happy = ["eyes/left/happy.svg", "eyes/right/happy.svg", "nose/happy.svg", "mouth/w_mouth.svg"]
+shock = ["eyes/left/small.svg", "eyes/right/small.svg", "nose/no_outline.svg", "mouth/w_mouth.svg"]
+upset = ["eyes/left/squint.svg", "eyes/right/squint.svg", "nose/squint.svg", "mouth/upset.svg"]
+upset_mild = ["eyes/left/squint.svg", "eyes/right/squint.svg", "nose/squint.svg", "mouth/downturned.svg"]
+evil = ["eyes/left/evil.svg", "eyes/right/evil.svg", "nose/evil.svg", "mouth/w_mouth.svg"]
+aww = ["eyes/left/aww.svg", "eyes/right/aww.svg", "nose/aww.svg", "mouth/w_mouth.svg"]
+snug_happy = ["eyes/left/happy.svg", "eyes/right/happy.svg", "nose/happy.svg"]
+snug_aww = ["eyes/left/aww.svg", "eyes/right/aww.svg", "nose/aww.svg"]
+eyes_base = ["eyes/left/base.svg", "eyes/right/base.svg"]
+holding_heart = ["hand/big_left.svg", "hand/big_right.svg"]
+ace_heart = ["holding/hearts/ace.svg"]
+agender_heart = ["holding/hearts/agender.svg"]
+blue_heart = ["holding/hearts/heart.svg", "holding/hearts/colors/blue.toml"]
+demi_heart = ["holding/hearts/demisexual.svg"]
+enby_heart = ["holding/hearts/enby.svg"]
+pan_heart = ["holding/hearts/pan.svg"]
pride_heart = ["holding/hearts/progress.svg"]
-red_heart = ["holding/hearts/red.svg"]
-blue_heart = ["holding/hearts/blue.svg"]
\ No newline at end of file
+red_heart = ["holding/hearts/heart.svg", "holding/hearts/colors/red.toml"]
+trans_heart = ["holding/hearts/trans.svg"]
+pat_blush = ["overlay/blush_pat.toml"]
+squint_eyes = ["eyes/left/squint.svg", "eyes/right/squint.svg"]
+extra_blush = ["overlay/more_blush.svg"]
+base_blush = ["overlay/blush.svg"]
diff --git a/designs.toml b/designs.toml
index d74e7bb..60c72c9 100644
--- a/designs.toml
+++ b/designs.toml
@@ -1,11 +1,24 @@
-arctic_hot_coco = ["arctic_fur", "fox_base", "hot_coco_cup", "arctic_hand_right"]
-arctic_coffee = ["arctic_fur", "fox_base", "coffee_cup", "arctic_hand_right"]
-arctic_happy_coffee = ["arctic_fur", "fox_happy", "coffee_cup", "arctic_hand_right"]
-arctic_blush = ["arctic_fur", "fox_blush"]
-arctic_upset = ["arctic_fur", "fox_upset"]
-cat = ["cat_fur", "cat_base"]
-arctic_aww = ["arctic_fur", "fox_aww"]
-fox_aww = ["fox_fur", "fox_aww"]
-arctic_hold_pride = ["arctic_fur", "fox_base", "pride_heart", "arctic_hold_heart"]
-arctic_hold_red = ["arctic_fur", "fox_base", "red_heart", "arctic_hold_heart"]
-arctic_hold_blue = ["arctic_fur", "fox_base", "blue_heart", "arctic_hold_heart"]
+arctic_blush = ["arctic", "fox_fur", "blush"]
+arctic_extra_blush = ["arctic", "fox_fur", "squint_eyes", "extra_blush"]
+arctic_happy = ["arctic", "fox_fur", "happy"]
+arctic_shock = ["arctic", "fox_fur", "shock"]
+arctic_upset = ["arctic", "fox_fur", "upset"]
+arctic_upset_mild = ["arctic", "fox_fur", "upset_mild"]
+arctic_evil = ["arctic", "fox_fur", "evil"]
+arctic_aww = ["arctic", "fox_fur", "aww"]
+
+arctic_snug_aww = ["arctic", "fox_snug", "snug_aww"]
+arctic_snug_happy = ["arctic", "fox_snug", "snug_happy", "base_blush"]
+
+arctic_blue_heart = ["arctic", "fox_fur", "eyes_base", "blue_heart", "holding_heart"]
+arctic_red_heart = ["arctic", "fox_fur", "eyes_base", "red_heart", "holding_heart"]
+arctic_ace_heart = ["arctic", "fox_fur", "eyes_base", "ace_heart", "holding_heart"]
+arctic_agender_heart = ["arctic", "fox_fur", "eyes_base", "agender_heart", "holding_heart"]
+arctic_demi_heart = ["arctic", "fox_fur", "eyes_base", "demi_heart", "holding_heart"]
+arctic_enby_heart = ["arctic", "fox_fur", "eyes_base", "enby_heart", "holding_heart"]
+arctic_trans_heart = ["arctic", "fox_fur", "eyes_base", "trans_heart", "holding_heart"]
+
+arctic_coffee_happy = ["arctic", "fox_fur", "happy", "cup_coffee"]
+arctic_coffee = ["arctic", "fox_fur", "face_base", "cup_coffee"]
+arctic_hot_coco = ["arctic", "fox_fur", "face_base", "cup_hot_coco"]
+arctic_no_coffee = ["arctic", "fox_fur", "upset_mild", "cup_empty"]
diff --git a/src/main.py b/src/main.py
index 702ae64..9471b5b 100644
--- a/src/main.py
+++ b/src/main.py
@@ -2,7 +2,8 @@ from svgutils.compose import *
from cairosvg import svg2png
import toml, os
-CONFIG["svg.file_path"] = "../assets/"
+asset_path = "../assets/"
+CONFIG["svg.file_path"] = asset_path
with open("../definitions.toml", "r") as def_file: #Load the part definitions
definitions = toml.loads(def_file.read())
@@ -10,6 +11,8 @@ with open("../designs.toml", "r") as design_file: #Load the user designs
designs = toml.loads(design_file.read())
with open("../config.toml", "r") as config_file: #Load the user config
config = toml.loads(config_file.read())
+with open("../assets/colors/base.toml", "r") as color_file: #Load the user config
+ base_colors = toml.loads(color_file.read())
os.makedirs("../output/vector/", exist_ok=True)
os.makedirs("../output/" + str(config["raster_size"]) + "/", exist_ok=True)
@@ -17,18 +20,39 @@ os.makedirs("../output/" + str(config["raster_size"]) + "/", exist_ok=True)
for key in designs:
currentDesign = designs[key] #Select the current design which is a list of parts
partsList = []
+ colors_out = {}
for part in currentDesign:
for url in definitions[part]:
partsList.append(url) #For each part add each element to the list
svg_parts = []
for part in partsList:
- svg_parts.append(SVG(part)) #Add each element of the list of paths to a new list as a SVG element
- Figure("128","128", *svg_parts, SVG("credits.svg")).save("../output/vector/" + key + ".svg") #Compile all parts into an SVG
+ if part.endswith(".toml"):
+ if "color" in part:
+ with open(asset_path + part) as transform_file:
+ swaps = toml.loads(transform_file.read())
+ colors_out.update(swaps)
+ else:
+ with open(asset_path + part) as transform_file:
+ transforms = toml.loads(transform_file.read())
+ svg_parts.append(SVG(transforms["file"]).scale(transforms["scale"]).rotate(transforms["rotate"]).move(transforms["translate"][0], transforms["translate"][1]))
+ else:
+ svg_parts.append(SVG(part)) #Add each element of the list of paths to a new list as a SVG element
+ Figure("128","128", *svg_parts, SVG("credits.svg")).save(f"../output/vector/{key}.svg") #Compile all parts into an SVG
+ with open(f"../output/vector/{key}.svg", "r") as in_file:
+ in_lines = in_file.read()
+ for color_key in colors_out:
+ if base_colors[color_key].lower() in in_lines.lower():
+ pattern = re.compile(base_colors[color_key], re.IGNORECASE)
+ in_lines = pattern.sub(colors_out[color_key].lower(), in_lines)
+
+ with open(f"../output/vector/{key}.svg", "w") as out_file:
+ out_file.write(in_lines)
+
if config["raster_images"]: #Create png of designated size
svg2png(
- url="../output/vector/" + key + ".svg",
- write_to="../output/" + str(config["raster_size"]) + "/" + key + ".png", output_width=config["raster_size"]
+ url=f"../output/vector/{key}.svg",
+ write_to=f"../output/{config['raster_size']}/{key}.png", output_width=config["raster_size"]
)
print("Done!")
\ No newline at end of file