diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/hex-colors-to-dict | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/hex-colors-to-dict b/tools/hex-colors-to-dict index 68073ab..babb483 100755 --- a/tools/hex-colors-to-dict +++ b/tools/hex-colors-to-dict @@ -2,16 +2,15 @@ import sys -result = 'table = {\n' -result += '\'white\' : \'black\' , \\\n' +result = 'colors = [\n' hex_file = open(sys.argv[1], 'r') for line in hex_file.readlines(): [ stroke, fill ] = line.split() - result += '\'#%s\' : \'#%s\', \\\n' % (fill, stroke) + result += '[\'#%s\', \'#%s\'], \\\n' % (fill, stroke) -result += '}' +result += ']' hex_file.close() |