sugar-toolkit-gtk3/tools/hex-colors-to-dict

19 lines
265 B
Plaintext
Raw Normal View History

2007-01-20 13:38:58 +01:00
#!/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