Skip to content

Instantly share code, notes, and snippets.

@fielding
Created March 7, 2015 00:47
Show Gist options
  • Save fielding/c0bbe9d667d89d0402ac to your computer and use it in GitHub Desktop.
Save fielding/c0bbe9d667d89d0402ac to your computer and use it in GitHub Desktop.
Warcraft Class colors converted to their closest 256-color match
#!/usr/bin/env python
import json
from colored import fg, bg, attr
classes = json.loads('{'
'"Priest": "231",'
'"Rogue": "227",'
'"Mage": "81",'
'"Paladin": "211",'
'"Warrior": "179",'
'"Warlock": "104",'
'"Hunter": "150",'
'"Shaman": "26",'
'"Druid": "208"'
'}')
res = attr('reset')
def main():
for i in classes:
color = classes[i]
print fg(color) + i + res
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment