I've moved this to its own repo here: https://github.com/kevinthompson/godot-generate-polygon-from-sprite-tool. Original gist is below.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Helper class to print colored output | |
# | |
# To use code like this, you can do something like | |
# | |
# print bcolors.WARNING | |
# + "Warning: No active frommets remain. Continue?" | |
# + bcolors.ENDC | |
# | |
# you can also use the convenience method bcolors.colored like this | |
# |