Add logoColorGenerator and svg sources

This commit is contained in:
legion 2020-12-13 11:44:32 +01:00
parent adac06dc24
commit 0aadd43e65
14 changed files with 17806 additions and 0 deletions

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 79 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 79 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 79 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 79 KiB

View File

@ -0,0 +1,38 @@
{
"violet":
[
["6800e7","6800e7"],
["40008b","40008b"],
["2a005e","2a005e"],
["15002f","15002f"]
],
"pink":
[
["6800e7","b239ff"],
["40008b","670096"],
["2a005e","450069"],
["15002f","240039"]
],
"blue":
[
["6800e7","03abeb"],
["40008b","0079a7"],
["2a005e","004c69"],
["15002f","002b3b"]
],
"turquise":
[
["6800e7","02fae0"],
["40008b","01a08f"],
["2a005e","01564d"],
["15002f","001b18"]
],
"red":
[
["6800e7","fd294f"],
["40008b","ae1d37"],
["2a005e","721425"],
["15002f","310810"]
]
}

View File

@ -0,0 +1,32 @@
#!/usr/bin/python3
import json
import sys
def loadColorTables(fn = 'colortables.json'):
with open(fn) as f:
return json.loads(f.read())
def readSrcSvg(fn = 'franconianNet.svg'):
with open(fn) as f:
return f.read()
def replaceColors(svg, table):
for mapping in table:
svg = svg.replace(mapping[0], mapping[1])
return svg
def genAll(srcFN = 'franconianNet.svg', tablesFN='colortables.json'):
tables = loadColorTables(tablesFN)
src = readSrcSvg(srcFN)
for name in tables:
repl = replaceColors(src , tables[name])
with open(srcFN.split(".")[0]+"_"+name+".svg", "w") as fo:
fo.write(repl)
if __name__ == "__main__":
genAll(sys.argv[1], sys.argv[2])

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 79 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 79 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 79 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 79 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 79 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 79 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 79 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 79 KiB