nunomaduro / termwind

🍃 In short, it's like Tailwind CSS, but for the PHP command-line applications.
MIT License
2.27k stars 76 forks source link

Add support for using the user's terminal's theme colors #141

Closed AdamGaskins closed 2 years ago

AdamGaskins commented 2 years ago

Modern terminals allow users to configure a "theme", which is 16 predefined colors that work well together, and with the terminal background.

image A theme in iTerm2

Most command line binaries use these 16 colors, so the output looks good in every theme. Here's msgcat output in a light and dark terminal theme:

image image

It would be awesome to make use of these in Termwind! That's the main thing keeping me from using it currently, since it feels less professional to show colors that may clash with the background (e.g. some people use a Solarized Light theme). I'm thinking something like text-ansi-red / bg-ansi-red for the class names?