Fix README code used to generate color examples table

This commit is contained in:
Jon Grace-Cox
2019-11-16 23:39:46 -05:00
parent 32935bd204
commit b7387b9f1e

View File

@@ -163,7 +163,7 @@ This table was generated with the following code:
print("""| Color Name | Hex Code | Example |
| ---------- | -------- | ------- |""")
for color, hex in sorted(anybadge.COLORS.items()):
file = 'examples/color_' + color + '.svg'
file = 'https://cdn.rawgit.com/jongracecox/anybadge/master/examples/color_' + color + '.svg'
anybadge.Badge(label='Color', value=color, default_color=color).write_badge(file, overwrite=True)
print("| {color} | {hex} | ![]({file}) |".format(color=color, hex=hex.upper(), file=file))