Skip to content

Instantly share code, notes, and snippets.

@jgriffiths
Created February 27, 2016 09:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgriffiths/4168dcd1ea6d9bceee40 to your computer and use it in GitHub Desktop.
Save jgriffiths/4168dcd1ea6d9bceee40 to your computer and use it in GitHub Desktop.
COLORS = {
'red': ( 255, 0, 0 ),
'orange': ( 255, 140, 0 ),
'yellow': ( 255, 185, 15 ),
'green': ( 0, 255, 0 ),
'gray': ( 192, 192, 192 ),
'blue': ( 0, 0, 255 ),
'purple': ( 159, 121, 238 ),
'black': ( 34, 34, 34 )
}
if __name__ == '__main__':
for name, v in COLORS.iteritems():
r, g, b = v
with open('%s.colors' % name, 'w') as f:
f.write('''[Colors:Window]
BackgroundNormal=%d,%d,%d
[WM]
activeBackground=%d,%d,%d
inactiveBackground=%d,%d,%d''' % (r, g, b, r, g, b, r / 2, g / 2, b / 2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment