tartley / colorama

Simple cross-platform colored terminal text in Python
BSD 3-Clause "New" or "Revised" License
3.51k stars 249 forks source link

random color #344

Closed meahura closed 2 years ago

meahura commented 2 years ago

You can generate color for the text by adding this code to the user's library.

tartley commented 2 years ago

Hi there! Thank you for the enthusiasm, but I don't think we can merge this PR. If users want to select a random color, they will all have different ideas about how that should be done (e.g. one user will want to choose a completely random color, as here, but another will want a random bright color, another will want a repeatable sequence of random colors, another will want to just choose from the base 16 colors, another will want the extended 255 colors, and another will want full RGB. We cannot anticipate all the variations users will want. So this logic is better handled in the application, rather than within Colorama.

Also, Colorama's core purpose is to convert ANSI codes so that they work on old Windows terminals. If the user wants to write an application which creates ANSI codes for fancy purposes (selecting colors, etc), then they should probably use the existing libraries that do a much better job of this than Colorama does, such as blessings or rich, rather than us adding more features to Colorama (but still not being remotely as good at this as those other libraries.) We should "do one thing and do it well".