Instead of defining a function for every color I simply used a for loop for generating them.
(...)
_colors = {x: x.upper() for x in __all__[:-3]}
_colors['normal'] = 'RESET'
for key, val in _colors.items():
function = eval(
'lambda s, always=False, bold=False: ColoredString("{}", s, always_color=always, bold=bold)'.format(val))
locals()[key] = function
del key, val, _colors, function
(...)
Instead of defining a function for every color I simply used a for loop for generating them.