You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
261 B
Python

#!/usr/bin/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