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

import sys

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 += ']'

hex_file.close()

print result