Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tools/hex-colors-to-dict
blob: 5fa3ea7682150ff6777036463606772aaa66ea55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/python

import sys

result = 'colors_dict = {\n'
result += '\'white\'   : \'black\'  , \\\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 += '}'

hex_file.close()

print result